Bug 28985 - It is not possible to use a shared filter from a shared jar file in the multiuser scenario
Summary: It is not possible to use a shared filter from a shared jar file in the multi...
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.24
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL: http://jakarta.apache.org/tomcat/tomc...
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-14 15:55 UTC by Petr Jiricka
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2004-05-14 15:55:22 UTC
We would like to be  able to do the following:

1) Create a filter and package it in a jar file
2) Use it in all applications by declaring it in $CATALINA_BASE/conf/web.xml
3) Do this on a per-user basis in the multiuser scenario, by putting the jar
file under CATALINA_BASE.

Putting the jar file in $CATALINA_HOME/common/lib does not work for us, as that
will apply to all users.

Putting the jar file under $CATALINA_BASE/shared/lib does not work either,
because in that case, the applications in $CATALINA_HOME/server/webapps (admin
and manager) are not able to read the filter class and throw a
ClassNotFoundException.

Shouldn't it be possible to do this? How?

Would it help if the Common classloader also loaded classes from
$CATALINA_BASE/common/lib ? Any ideas on this would be appreciated. Thanks.
Comment 1 Remy Maucherat 2004-05-14 21:23:54 UTC
Well, for complex security, there's the security manager. I don't see how the
classloader visibility could allow a lot of things.
Comment 2 Petr Jiricka 2004-05-17 17:41:48 UTC
Remy, sorry, I am afraid I don't understand your comment. Are you saying that:

- this request is not worth doing, or
- there are technical problems which mean that this is not possible to do, or
- the request is unreasonable ?

Thanks.
Comment 3 Remy Maucherat 2004-05-30 12:07:13 UTC
It's the second option: either a classloader can load a class or it cannot. So
by definition, if you put the class in one of the "shared" loaders, it will be
visible from all webapps.
As for configuring the CL, you can configure the CL repositories using
catalina.properties (a feature I added in 5.0.x, but isn't documented; feel free
to ask questions about that to Jean-François, he knows it well). By default, I
think it would be bad to add additional repositories to the CL (more complexity).

Note: By default:
- common is based on catalina.home
- shared is based on catalina.base
Comment 4 Petr Jiricka 2004-05-31 11:03:37 UTC
Agreed, I think tweaking catalina.properties will work for us, especially after
the fix to org.apache.catalina.startup.CatalinaProperties (rev.1.6) that
Jean-Francois put in on 05/18.