tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harakiri <harakiri...@yahoo.com>
Subject Re: Dynamically add Filter to webapp without declaring in web.xml
Date Tue, 01 Aug 2006 20:19:01 GMT
Thank you David judging by the description of "All
ServletContextListeners are notified of context
initialization BEFORE any filter" its exactly what i
need.

--- David Smith <dns4@cornell.edu> wrote:

> 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:
> users-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >  
> >
> 
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message