The RequestProcessor  processPreprocess(request, response) method seems the
best but
 I'm not sure how to override it for my first login page where the valid
session is not set up yet.
Can I give a specific requestProcessor for an individual action mapping?

Thanks for the first response Niall.

----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: April 9, 2004 11:43 AM
To: Struts Users Mailing List
Subject: Re: Question about throwing an exception in the ValidatorForm
validate method.

Do you want to do this on a form by form basis or for all forms?

If you want to do it for all forms then you could either customise
RequestProcessor (maybe in the processPreprocess(request, response) method)
or use a Filter.

If you need to do it on a form by form basis, then why not skip validation
if its expired and let the Action check your session and throw the
Exception.

Niall


----- Original Message -----
From: "Stephan Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 7:06 PM
Subject: Question about throwing an exception in the ValidatorForm validate
method.


> I have a problem I need advice solving.
>
> The Validate method does not allow me to check if the session has expired
> and throw a suitable exception.
> I have the possible scenario where a user calls up a page. Leaves it idle
> long enough to expire the session. Then hits the update button.
>
> What happens is the validate method is called and the record is validated.
> Since the session has timed out when the  input page with an error is
> presented some of the values on my page, (like the current logged in user)
> are no longer available.
>
> Ideally I would like to check the session in the validate method, throw my
> usual SessionExpiredException if the session is blank but the validate
> method does not allow me to override the ValidatorForm validate method.
>
> Any advice on how to elegantly solve this?
>
>
>
>
>



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



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

Reply via email to