At 12:46 PM -0600 2/19/04, Brad Balmer wrote:
While you can use a filter to do this, why not extend the RequestProcessor class?
By overriding the processPreprocess function you can check for your flag. If found simply return true to continue processing. Otherwise forward the user onto the login page.

I thought about suggesting this, but in processPreprocess, it might be complicated for the logic check to know whether the person is approaching an action which required a valid session. Doing it in the Action means you have the ActionMapping as a very easy place to hang information about whether or not validation is required.


If you can structure your app so that you can do a check like this based on a URL fragment, then using a ServletFilter or extending RequestProcessor are good ideas -- in fact, better, if you ask me, because then you don't burn your single inheritance for your Action classes.

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin


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



Reply via email to