You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Lipov, Felix" <Fe...@morganstanley.com> on 2004/03/05 15:10:04 UTC

Entity Declarations in JSP/XML

Hi,

I'm having problems when I try to declare an XML ENTITY, like &nbsp in
an XML formatted JSP page. Tomcat 4 never gave problems, but Tomcat 5
always gives errors off of the following example:

<?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" version="1.2">
  <html>
  <body>
  &nbsp;
  </body>
  </html>
</jsp:root>


Saying:
org.apache.jasper.JasperException: /test.jsp(9,521) Element type
"jsp:root" must be declared.
...

Any one have any ideas? Or even a reference as to where I could get more
help. Even an XML reference. I'm not sure what exactly it wants,
especially when Tomcat 4 didn't have problems with the given syntax.

Thanks.


**** 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Entity Declarations in JSP/XML

Posted by Eric Suen <er...@hotmail.com>.
Hi,

    Long time ago, I ask the same question, and got no answer.
and I found these in JavaServer Pages Specification 2.0:

> JSP.6.2.4 JSP Document Validation
>
>   A JSP Document with a DOCTYPE declaration must be validated
> by the container in the translation phase. Validation errors
> must be handled the same way as any other translation phase
> errors, as described in Section JSP.1.4.1.
>
>   JSP 2.0 requires only DTD validation for JSP Documents;
> containers should not perform validation based on other
> types of schemas, such as XML schema.

Maybe the validate should not make for internal DTD declarations,
and IMHO, that kind of  Specification is stupid, JSP should just be
template engine, not XML validator, if I want validate, I think I know
how to do it, for template engine, the XML file well-formed is enough.

Regards




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org