Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1907

Set content type to text/html in all generated jspx pages to allow use of other Templating frameworks besides Tiles

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: 1.1.0.RELEASE, 1.1.1.RELEASE, 1.1.2.RELEASE, 1.1.3.RELEASE, 1.2.0.RC1
    • Fix Version/s: 1.1.1.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None
    • Environment:
      Sitemesh 2.4.2

      Description

      I have created a Roo Sitemesh addon that works out of the box with the existing generated pages.

      The only problem I am having is that because the pages are jspx and rendered directly, Tomcat renders the pages as text/xml.

      I need the following jsp:directive:
      <jsp:directive.page contentType="text/html;charset=UTF-8" />
      in all jspx pages.

      I would suggest placing this above the
      <jsp:output omit-xml-declaration="yes" />
      tag that is already in every jspx page.

      Adding the directive to all jspx pages will have no impact on the existing Tiles application.

      This problem does not happen with Tiles because this directive is already in the default.jspx layout which is compositely rendered.

      Sitemesh uses the decorator pattern and because the pages have already been rendered with the content type set, I can not change the content type in the decorator.

        Attachments

          Activity

            People

            • Assignee:
              sschmidt Stefan Schmidt
              Reporter:
              sdmurphy Scott Murphy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: