Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2704

duplicate processing instructions when using jspx

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.2.8
    • None
    • Tiles 1 Plugin
    • None
    • Operating System: All
      Platform: All
    • 38007

    Description

      When using the new xml notation of jsp files using tiles will result in a
      duplicate xml processing instruction. I wrote these two test files and put them
      in the root of tomcat 5.5 (tried it on tomcat 5.0 aswell).

      default.jspx
      ============================================================
      <?xml version="1.0" encoding="utf-8"?>
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:jsp="http://java.sun.com/JSP/Page" xml:lang="en">
      <jsp:output doctype-root-element="html"
      doctype-public="-//W3C//DTD XHTML 1.1//EN"
      doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
      <jsp:directive.page language="java" pageEncoding="utf-8"
      contentType="text/html;charset=utf-8" />
      <head>
      <title>
      Test page
      </title>
      </head>
      <body>
      Test Page
      </body>
      </html>
      ============================================================

      definition.jspx
      ============================================================
      <tiles:insert xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
      page="/default.jspx" flush="true">
      </tiles:insert>
      ============================================================

      the output produced by calling definition.jspx is:
      ============================================================
      <?xml version="1.0" encoding="UTF-8"?>
      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>
      Test page
      </title></head><body>
      Test Page
      </body></html>
      ============================================================

      As you can see this results in a duplicate xml processing instruction. Removing
      the instruction from default.jspx won't work since the instruction is added by
      the xml parser. But since the processing instruction of tiles pages show a
      slight difference (capatalization) I conclude this is a tiles bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            m.platvoet@chello.nl Mark Platvoet
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: