You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Benoit Lalumiere (LMC)" <Be...@ericsson.ca> on 2001/10/30 15:47:17 UTC

tomcat 3.2.3 classloader in an include

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>