Thx, I filed a bug -> http://issues.apache.org/bugzilla/show_bug.cgi?id=41182

I also adapted my local tomcat source in JspRuntimeContext:335 to always add the classpath from the servlet init param to the classpath provided by the container (the WebappClassloader classpath) just to see whether I could achieve the intended behavior for my needs. Now the JSP translates and compiles, but when JspServlet then instantiates the servlet and delegates to the servlet's service method a ClassNotFoundException is thrown for my test class (that is used in the JSP and resides in the additional classpath location). This seems reasonable since the thread runs with the WebappClassloader which knows nothing of the additional classpath location. I wonder whether the classpath init param of JspServlet is the way to go to achieve my goals. Since I use only one servlet as application dispatcher that will handle the class loading for controllers and middle tier, the idea is to override the JspServlet mapping in my web.xml and patch the classpath there. I know that this is tomcat specific and not the cleanest way to go, but I don't want to replace the WebappClassloader completely since this is probably a lot more work and touches more of tomcat's internals. I would appreciate your feedback whether this is complete nonsense or could somehow work.

werner


Mark Thomas wrote:
werner loibl wrote:
Mark,

thanks for looking into this! I changed the classpath param according to
your suggestion but still it's not working.

Are you sure the source considers the classpath property in a typical
web setup? In JspRuntimeContext on line 335 the code says:

Having looked at the source again, you are right. I need to spend some
more time looking into the change history to understand why things are
the way they are. This might be a documentation problem rather than a
code bug but either way something needs to be changed so raise a bug
report and I'll look into it.

Thanks,

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to