You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/07/14 06:37:48 UTC

DO NOT REPLY [Bug 35725] New: - jasper throws org.apache.jasper.JasperException with XHTML document

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35725>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35725

           Summary: jasper throws org.apache.jasper.JasperException with
                    XHTML document
           Product: Tomcat 5
           Version: 5.5.9
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jljlmatu@jp.ibm.com


When the following XHTML document is accessed through Tomcat,
----- jsp document -----
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
	<jsp:directive.page language="java"
		contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
	<jsp:text>
		<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
	</jsp:text>
	<jsp:text>
		<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> ]]>
	</jsp:text>
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>jsp-xhtml.jsp</title>
	</head>
	<body>
		<p>&nbsp;</p>
		<hr/>
		<p>&#160;</p>
		<hr/>
		<p>&lt;</p>
		<hr/>
		<p>&gt;</p>
		<hr/>
		<p>&quot;</p>
		<hr/>
		<p>&amp;</p>
		<hr/>
		<p>&apos;</p>
	</body>
	</html>
</jsp:root>
----- jsp document -----
jasper throws the following exception.
org.apache.jasper.JasperException: /xml/jsp-xhtml3.jsp(16,12) The entity "nbsp"
was referenced, but not declared.
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
	org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:211)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:196)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

but when I removed the line of <p>&nbsp;</p>, it works.
I'm wondering why jasper accepts :
		<p>&#160;</p>
		<p>&lt;</p>
		<p>&gt;</p>
		<p>&quot;</p>
		<p>&amp;</p>
		<p>&apos;</p>
but doesn't accept <p>&nbsp;</p>. All above entitis are valid
for XHTML usage.


.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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