On Wed, 31 Jul 2002, Chris Ruegger wrote:

> Date: Wed, 31 Jul 2002 09:18:21 -0400
> From: Chris Ruegger <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: putting custom code in front of Struts Main Servlet
>
> This is a bit off topic but we are using Tomcat with Struts.
> We want to be able to always execute some code before
> the Struts servlet is invoked, to check for things like lost
> session, permission, etc.  What is the best way to do this?
> I'm thinking either have a servlet that we send everything to,
> then have it call the Struts servlet, or use servlet filters
> somehow (have not used them yet but vaguely familiar with them)
> What approaches have others used for this?
>

If you want to intercept each request before it gets to the Struts
controller servlet (or any other resource in your app), filters are
definitely the way to go.  There are some pointers to tutorial information
on the Servlet page at java.sun.com
<http://java.sun.com/products/servlet/>.  There's also *lots* of good
tutorial information on web application development in the Web Services
Pack tutorial (start at <http://java.sun.com/webservices/>).

> Thanks
>
>

Craig



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to