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 2003/08/14 23:50:21 UTC
DO NOT REPLY [Bug 22439] New: -
NPE compiling JSP Document
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22439>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22439
NPE compiling JSP Document
Summary: NPE compiling JSP Document
Product: Tomcat 5
Version: 5.0.7
Platform: Other
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Jasper2
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: hans@gefionsoftware.com
The following JSP Document doesn't compile:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3c.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xml:lang="en" lang="en">
<jsp:directive.page contentType="text/html" />
<head>
<title>A JSP Document</title>
</head>
<body bgcolor="white">
<h1>All Request Parameters</h1>
<ul>
<c:forEach xmlns:c="http://java.sun.com/jsp/jstl/core"
items="${paramValues}" var="current">
<li>
${current.key}:
<c:forEach items="${current.value}" var="parValue">
<br/>${parValue}
</c:forEach>
</li>
</c:forEach>
</ul>
<jsp:element name="${param.element}">
<jsp:attribute name="style">${param.style}</jsp:attribute>
<jsp:body>${param.body}</jsp:body>
</jsp:element>
</body>
</html>
The root cause for the exception is:
java.lang.NullPointerException
org.apache.jasper.compiler.PageInfo.popPrefixMapping(PageInfo.java:339)
org.apache.jasper.compiler.JspDocumentParser.endPrefixMapping(JspDocumentParser.java:574)
org.apache.xerces.parsers.AbstractSAXParser.endNamespaceMapping(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(Unknown Source)
org.apache.xerces.impl.XMLNamespaceBinder.endElement(Unknown Source)
org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
javax.xml.parsers.SAXParser.parse(Unknown Source)
org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:195)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:223)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
It works fine with TC 5.0.4