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 25448] New: - jsp:include is intolerant of whitespace
Date Thu, 11 Dec 2003 15:31:09 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=25448>.
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=25448

jsp:include is intolerant of whitespace

           Summary: jsp:include is intolerant of whitespace
           Product: Tomcat 5
           Version: 5.0.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: larry@oculan.com


While upgrading from Tomcat 4.1.18 to 5.0.16, I encountered a problem where
several of my JSPs will not compile.  I found that the following syntax was
causing Jasper to to throw an error.

The syntax:
      <jsp:include page="/asset/search-includeaction.jsp" flush="false" >
      </jsp:include>

Would cause this exception to be thrown:
org.apache.jasper.JasperException: /asset/index.jsp(43,6) Expected "param" tag
with "name" and "value" attributes
	at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
	at org.apache.jasper.compiler.Parser.parseParam(Parser.java:892)
	at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1838)
	at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1100)
	at org.apache.jasper.compiler.Parser.parseInclude(Parser.java:928)
	at org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1251)
	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1597)
	at org.apache.jasper.compiler.Parser.parse(Parser.java:171)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:247)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:149)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:135)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:594)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at
org.opennms.web.UTF8RequestEncodingValve.invoke(UTF8RequestEncodingValve.java:56)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
	at java.lang.Thread.run(Thread.java:536)


Workaround:
Do one of two things, either make the tag a proper XML empty tag like this:
      <jsp:include page="/asset/search-includeaction.jsp" flush="false" />
Or make sure there is nothing at all between the tags like this:
      <jsp:include page="/asset/search-includeaction.jsp" flush="false" >    
</jsp:include>


Marking as minor as the preferred style (the empty tag) completely works around
this problem.

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


Mime
View raw message