Depending on your version of tomcat, ServletContextListener may be an excellent standard way to go. There was a thread just a few days ago on that.

--David

Harakiri wrote:

Hello,

is it possible to dynamically add a Filter for a web
app using the tomcat ? If so, is there an example how
to do this ?

OR is it possible to somehow init some webapps params
before the Filter is loaded ? I tried to use a Servlet
and used the <load-on-startup>1</load-on-startup>
within the web.xml - however the servlet is loaded
AFTER the filter is initialized (even when no web page
has been requested). Is there a better approach then
using a init servlet ?

The problem i currently have, is that im using a 3rd
party Security Filter which has "no knowledge" of my
application and relies on some Configuration (access
rights) which is initialized by my webapp.
A good example for this problem would be if you have
dynamic Log4j configuration i.e. not using a log4j.xml
in the classpath but configuring it through the java
api. The Filter is already initialized when you do the
log4j initializion in the init servlet - thus making
it impossible to see/track an debug/error messages
from the filter at all.



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
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