Lee Harrington wrote:
I want to check to see if the user is logged in before performing any action, and redirect to the login page if they are not.
For example...they have a page open and their session times out....and then they click a button. Right now an error occurs because they are no longer logged in.
I wrote a bit of code that if I put it in the beggining of an action class...does just that. But I don't want to have to put this in the front of each of my actions (particularly since I've already written a good portion of the app).
Do I solve this by subclassing the action forward -- or in some other way?
Lee
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Lee,
Have you considered implementing a simple servlet filter to accomplish this? Alternatively, you could extend the RequestProcessor and provide a custom implementation of the processRoles method. However, that seems a bit heavy handed for something a simple as checking if a user is logged in.
Josh
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]