Topic
1 reply Latest Post - ‏2010-11-21T22:20:38Z by Breckin.Crudup
SystemAdmin
SystemAdmin
41 Posts
ACCEPTED ANSWER

Pinned topic Generated JSPs are not valid

‏2010-08-04T17:31:24Z |
Hi,

the following problem still occurs since version 7.0 of RAD (I guess). My hope was that it is resolved with V8, but it is not.

When generating a JSP in XML style syntax, the generated code is not correct. Here is an example of a JSP within a JSF 1.1. project:


<?xml version=
"1.0" encoding=
"ISO-8859-1" ?> <!-- jsf:pagecode language=
"java" location=
"/src/pagecode/WEBINF/Test.java" --><!-- /jsf:pagecode --> <!DOCTYPE html PUBLIC 
"-//W3C//DTD XHTML 1.1//EN" 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><jsp:root xmlns:jsp=
"http://java.sun.com/JSP/Page" version=
"2.0" xmlns:f=
"http://java.sun.com/jsf/core"><jsp:directive.page language=
"java" contentType=
"text/html; charset=ISO-8859-1" pageEncoding=
"ISO-8859-1"></jsp:directive.page> <html xmlns=
"http://www.w3.org/1999/xhtml"> <head> <title>test</title><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" omit-xml-declaration=
"false"></jsp:output> <meta http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1" /> <meta name=
"GENERATOR" content=
"Rational® Application Developer for WebSphere® Software" /> </head> <f:view> <body>   </body> </f:view> </html> </jsp:root>


The DOCTYPE is not correct, in some cases, the JSP version is the servlet version, and after editing the JSP in the Page Designer, sometimes the XML prolog is moved behind the PageCode-Comment which occurs a translation exception during runtime.

Could you please fix it in the current release?
The correct template would be


<?xml version=
"1.0" encoding=
"ISO-8859-1" ?> <!-- jsf:pagecode language=
"java" location=
"/src/pagecode/WEBINF/Test.java" --><!-- /jsf:pagecode --> <jsp:root xmlns:jsp=
"http://java.sun.com/JSP/Page" version=
"2.0" xmlns:f=
"http://java.sun.com/jsf/core"><jsp:directive.page language=
"java" contentType=
"text/html; charset=ISO-8859-1" pageEncoding=
"ISO-8859-1"></jsp:directive.page> <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" omit-xml-declaration=
"false"></jsp:output>   <html xmlns=
"http://www.w3.org/1999/xhtml"> <head> <title>test</title> <meta http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1" /> <meta name=
"GENERATOR" content=
"Rational® Application Developer for WebSphere® Software" /> </head> <f:view> <body>   </body> </f:view> </html> </jsp:root>
Updated on 2010-11-21T22:20:38Z at 2010-11-21T22:20:38Z by Breckin.Crudup
  • Breckin.Crudup
    Breckin.Crudup
    1 Post
    ACCEPTED ANSWER

    Re: Generated JSPs are not valid

    ‏2010-11-21T22:20:38Z  in response to SystemAdmin
    myOwnScreen wrote:
    Hi,

    the following problem still occurs since version 7.0 of RAD (I guess). My hope was that it is resolved with V8, but it is not.

    When generating a JSP in XML style syntax, the generated code is not correct. Here is an example of a JSP within a JSF 1.1. project:



    The DOCTYPE is not correct, in some cases, the JSP version is the servlet version, and after editing the JSP in the Page Designer, sometimes the XML prolog is moved behind the PageCode-Comment which occurs a translation exception during runtime.

    Could you please fix it in the current release?
    The correct template would be


    I'm still waiting for the answer, I have the similar question, Thanks very much! It's very long now, Anyone have got the solution?