tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steiniger Manfred <steini...@slf.ch>
Subject jsp:include doesn't work with tomcat 4.1.8 and Struts 1.1 beta 1
Date Mon, 05 Aug 2002 10:34:43 GMT
Hi Tomcat developers,

I get the following error if I run a Struts JSP (see include.jsp) which 
uses jsp:include under Tomcat 4.1.8 and Tomcat 4.1.7.
With Tomcat 4.1.2 it works without problems:
If I don't use the Struts <html:html> tag, then it is okay.
I use Struts 1.1 Beta 1 under Windows 2000.

__________________________________________________________________________
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
     [javac] Compiling 1 source file
D:\Tomcat_4.18\work\Standalone\localhost\infoman\include_jsp.java:83: 
include(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.String,javax.servlet.jsp.JspWriter,boolean)

in org.apache.jasper.runtime.JspRuntimeLibrary cannot be applied to 
(javax.servlet.http.HttpServletRequest,javax.servlet.ServletResponse,java.lang.String,javax.servlet.jsp.JspWriter,boolean)
           JspRuntimeLibrary.include(request, response, "foo.jsp", out, true);
                            ^
1 error
__________________________________________________________________________

Here is the code of include.jsp:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html locale="false">
<body bgcolor="white">
<hr>
<jsp:include page="foo.jsp" flush="true"/>
<hr>
</html:html>

__________________________________________________________________________

Here is the code of foo.jsp:

<body bgcolor="white">
<font color="red">
<%= System.currentTimeMillis() %>


__________________________________________________________________________
To reproduce the error you can copy the two JSPs into the 
tomcat\server\webapps\admin directory and call

http://localhost:8080/admin/include.jsp

__________________________________________________________________________

Here is the complete exception text:

org.apache.jasper.JasperException: Unable to compile class for JSP
	at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:477)
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:182)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
	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:995)
	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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:527)
	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:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2350)
	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:171)
	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:995)
	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:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:484)

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
     [javac] Compiling 1 source file
D:\Tomcat_4.18\work\Standalone\localhost\infoman\include_jsp.java:83: 
include(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.String,javax.servlet.jsp.JspWriter,boolean)

in org.apache.jasper.runtime.JspRuntimeLibrary cannot be applied to 
(javax.servlet.http.HttpServletRequest,javax.servlet.ServletResponse,java.lang.String,javax.servlet.jsp.JspWriter,boolean)
           JspRuntimeLibrary.include(request, response, "foo.jsp", out, true);
                            ^
1 error


	at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)
	at 
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:312)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
	at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:182)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
	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:995)
	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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:527)
	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:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2350)
	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:171)
	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:995)
	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:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:484)


Best regards
Manfred Steiniger
----------------------------------------------------------------------------
Manfred Steiniger
Lawinenwarnung und Risikomanagement
Eidg. Institut fuer Schnee- und Lawinenforschung SLF
Fl├╝elastrasse 11
CH-7260 Davos Dorf

Tel:     ++41 (081) 41 70 352	Fax:     ++41 (081) 41 70 110
Email:   steiniger@slf.ch    	Internet: http://www.slf.ch
----------------------------------------------------------------------------


--
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