tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14413] New: - NPE while using jsp:attribute in JSP Document
Date Sat, 09 Nov 2002 19:00:14 GMT
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=14413>.
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=14413

NPE while using jsp:attribute in JSP Document

           Summary: NPE while using jsp:attribute in JSP Document
           Product: Tomcat 5
           Version: 5.0.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Jasper2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: prasad.subramanian@sun.com


If a JSPDocument has a jsp:attribute that has both the attributes specified as
XML style attributes ,a NPE is thrown while parsing. In case the value attribute
is specified as a body then the JSP document is compiled and executed properly.

Here is the JSP Document :
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:st="/SimpleTaglib"  
version="2.0" >
 <st:simplefmtbegin var="myDt" pattern="MM/dd/yyyy" >
    	<jsp:attribute name="input" value="02/02/2001"/>
 </st:simplefmtbegin>
 <jsp:text><![CDATA[ <br> This is the date <br> ]]> </jsp:text>
 
 <jsp:text><![CDATA[ <br> This is the date from EL <br> ]]> </jsp:text>
 
 <jsp:text>${myDt}</jsp:text>
     
</jsp:root>

=====
Here is the error 
=====
java.lang.NullPointerException
	at
org.apache.jasper.compiler.JspDocumentParser.endElement(JspDocumentParser.java:380)
	at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
	at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:222)
	at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:595)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:394)
	at org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:180)
	at org.apache.jasper.compiler.ParserController.parseFile(ParserController.java:207)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:150)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:139)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:263)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:413)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:297)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:194)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:996)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:996)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2523)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:996)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:996)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:413)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:536)

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


Mime
View raw message