You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stanislav <sk...@inet.hr> on 2006/05/05 15:19:09 UTC

Struts filter help

Hi!

I want to do some check every time when java file "starts". How can i do this? I think that is
posible with filter in web.xml, but i dont know how to do this :-(


Tnx, 
Stanislav

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts filter help

Posted by Ed Griebel <ed...@gmail.com>.
Depending on what you mean by "Java file starts", there's 3 things you can do.

- Once on creation of a session, implement HttpSessionListener and
specify the listener in web.xml
- Once for every request, create a filter by extending
AbstractHttpFilter or implementing HttpFilter and specify the filter
and what URLs map to the filter in web.xml
- Once on startup (or shutdown) of the web app (including deployment),
create a ContextListener by implementing ServletContextListener and
specify the listener in web.xml

HTH,
-ed

On 5/5/06, Stanislav <sk...@inet.hr> wrote:
> Hi!
>
> I want to do some check every time when java file "starts". How can i do this? I think that is
> posible with filter in web.xml, but i dont know how to do this :-(
>
>
> Tnx,
> Stanislav
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org