tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Millett <...@ec-group.com>
Subject Re: jsp:include doesn't work with tomcat 4.1.8 and Struts 1.1 beta 1
Date Mon, 05 Aug 2002 17:01:32 GMT
On Mon, 2002-08-05 at 05:34, Steiniger Manfred wrote:
> 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
>            JspRuntimeLibrary.include(request, response, "foo.jsp", out, true);
>                             ^

Yep, its a bug with a patch submitted to bugzilla.  Still exists in
4.1.8 beta.  I guess it is a bug with low priority otherwise it would
have been fixed by now.  The problem is in
jakarta-tomcat-4.1.8-src/jasper/src/share/org/apache/jasper/compiler/Generator.java about
line 1158  (This line number changes with the latest cvs checkout of jasper tomcat_4_branch
BUT the code is the same)

if (n.isHasIncludeAction()) {
   out.println("ServletResponse response = pageContext.getResponse();");
}

NEEDS to be:
 
if (n.isHasIncludeAction()) {
   out.println("HttpServletResponse response =
(HttpServletResponse)pageContext.getResponse();");
}


Hope this helps.
-- 
Brian Millett                    
Enterprise Consulting Group     "Shifts in paradigms
(314) 205-9030                     often cause nose bleeds."
bpm@ec-group.com                   Greg Glenn


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