Hi,

I've been using the XML syntax for JSPs without much problem in Tomcat
4.1. When I try to read those same pages in Tomcat 5 I get errors. The
issue is with declared entities, like nbsp for space. Below is a sample
and the error I get. How in general can I declare something like nbsp
and have it work without the jsp compiler complaining regarding syntax?

Thanks.

Here is the sample:

<?xml version="1.0" ?>
<!DOCTYPE jsp:root [
  <!ENTITY nbsp "&#160;">
  <!ENTITY le "&#8804;">
  <!ENTITY ge "&#8805;">
]>


<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page";
xmlns:logic="http://jakarta.apache.org/struts/tags-logic";
xmlns:bean="http://jakarta.apache.org/struts/tags-bean";
xmlns:bean-el="http://jakarta.apache.org/struts/tags-bean-el";
xmlns:html="http://jakarta.apache.org/struts/tags-html";
xmlns:html-el="http://jakarta.apache.org/struts/tags-html-el";
xmlns:sql="http://java.sun.com/jstl/sql";
xmlns:c="http://java.sun.com/jstl/core";
xmlns:fmt="http://java.sun.com/jstl/fmt"; version="1.2">
  <html>
  <body>
  beforespace&nbsp;afterspace
  </body>
  </html>
  </jsp:root>

Output:
org.apache.jasper.JasperException: /test.jsp(9,521) Element type
"jsp:root" must be declared.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:126)
org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.jav
a:241)
org.apache.jasper.compiler.ParserController.doParse(ParserController.jav
a:235)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:
139) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 




**** Important Notice to Recipients ****
It is important that you do not use e-mail to request, authorize or effect the 
purchase or sale of any security or commodity, to send fund transfer instructions, or 
to effect any other transactions. Any such request, orders, or instructions that you 
send will not be accepted and will not be processed by Morgan Stanley.
****************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to