You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Sayre <ri...@gmail.com> on 2007/07/04 16:39:58 UTC

Interceptors

I am new to struts and I am trying to write an interceptor.

I have the interceptor set up so it runs on every action (except one).
 The interceptor checks the users session to make sure it has not
timed out.

If the session is after timing out I want to create a new session and
add some values to the an object we keep in session and redirect them
to the main page of our application.  I assumed if the interceptor
found that the session was expired then I could redirect to a
CreateSession action.


I have a few questions:


Is this a good use for an interceptor?

In the struts docs it says:
 "Just like an action method, intercept returns a result used by
Struts to forward the request to another web resource"
I know how to call the next interceptor if everything works but how do
I call a different action if the session is timed out?

Is my logic is ok?

Thank you,

Rich

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