What mechanism should be used to intercept all requests in a struts
application? I'm looking for something similar to a Tomcat
RequestInterceptor but applicable only to a specific ServletContext. I want
to be able to do some housekeeping before the first call to
servlet.service() for that request. That is, I want to insert some logic
before any of my business logic is called, be it in the form of an
ActionForm, an Action, a servlet or just a .jsp page.

Specifically, what I'm trying to do is to insert some global sanity checks
on the request before any ActionForm validate() methods are called. Of
course, I want the same checks performed before any .jsp rendering or any
servlet.service() calls. One way to do this would be to subclass
ActionServlet and insert some checks there and also have all .jsps and
servlets call that same code before doing anything.

Is there a better way? Ideally, I wouldn't have to manually have to add all
the calls to the sanity checker.

----
Payam Mirrashidi
[EMAIL PROTECTED]



Reply via email to