  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | some question about JSPX and the output format | some question about JSPX and the output format 2004-02-02 - By Eric Suen
Back Hi,
I have a jspx like this:
<?xml version="1.0" encoding="UTF-8 (See http://UTF-8.ora-code.com)"?> <!DOCTYPE fo:root [ <!ENTITY nbsp " "> ]> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:jsp="http://java.sun.com/JSP/Page"> <test name="test" value="test"></test> </fo:root>
it can be parsed by xerces2.6, but when I run it, server throw exception like this: org.apache.jasper.JasperException : /blank.jspx(5,96) Element type "fo:root" must be declared. at org.apache.jasper.compiler.DefaultErrorHandler (DefaultErrorHandler. java:83) at org.apache.jasper.compiler.ErrorDispatcher (ErrorDispatcher.java:402 ) at org.apache.jasper.compiler.ErrorDispatcher (ErrorDispatcher.java:126 ) at org.apache.jasper.compiler.JspDocumentParser (JspDocumentParser.java:23 4) at org.apache.jasper.compiler.ParserController (ParserController.java:224) at org.apache.jasper.compiler.ParserController (ParserController.java:149) at org.apache.jasper.compiler.ParserController (ParserController.java:135) at org.apache.jasper.compiler.Compiler (Compiler.java:237) at org.apache.jasper.compiler.Compiler (Compiler.java:456) at org.apache.jasper.compiler.Compiler (Compiler.java:439) at org.apache.jasper.JspCompilationContext (JspCompilationContext.java:5 52) at org.apache.jasper.servlet.JspServletWrapper (JspServletWrapper.java:2 91) at org.apache.jasper.servlet.JspServlet (JspServlet.java:301) at org.apache.jasper.servlet.JspServlet (JspServlet.java:248) at javax.servlet.http.HttpServlet (HttpServlet.java:856)
Another question is about output format, the source xml code is: <test name="name" value="test"></test> but the output changes to: <test value="test" name="name"/>
I want use jspx as template engine, but the output format is not as expected. as I understand, jsp just for generating dynamic content, why it acted like xml validator and xml formatter?
I use tomcat 5.0.18
Regards,
Eric
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|
 |