tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Lalumiere (LMC)" <Benoit.Lalumi...@ericsson.ca>
Subject tomcat 3.2.3 classloader in an include
Date Tue, 30 Oct 2001 14:47:17 GMT
Hi All

I am using tomcat 3.2.3 and have the following problem

when performing an include from one servlet to another or one jsp to another
with the following command

ServletContext other = getServletContext().getContext("/demo");
other.getRequestDispatcher("/jsp/form.jsp").include(request,response);

I have classloader problems (specifically, when I try to use EJB from the
included servlet, I get ClassCast Exceptions)

I am using the jdk1.2.2 and therefore I use the
"org.apache.tomcat.request.Jdk12Interceptor"

but this fix does not seem to work when used within an included servlet.

in the Jdk12Interceptor, the servlet classloader being set in the thread is
the one from the calling servlet and not the included servlet.  Looking at
the code in the the Jdk12Interceptor class, we can see that the actual
context being passed is the one from the calling servlet and should probably
be setted properly in the org.apache.tomcat.facade.requestDispatcherImpl
class.

But before I try to fix this I was wandering if there was a fix for this
problem already?

I do not have the time to update to 3.3 or 4.0 at this time.

Benoit Lalumiere
Ericsson Research Canada
LMC/KJ lmcblal
TSP J2EE Application Server



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