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.
Well, for complex security, there's the security manager. I don't see how the classloader visibility could allow a lot of things.
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.
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
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.