You could forward (not redirect) to a generic failure page if there are errors present. I confess i haven;t done this but it could be what you want, even forward to a global forward defined in struts config, so you can reuse you error page for other stuff.




On 13 Jan 2004, at 16:27, Christian Schlaefcke wrote:


Hi Folks,

I have a simple login.jsp that I want to validate. So I have a Class
"LoginForm" with a "validate" method, that fills up the ActionErrors with
the errors that might occur (missing username/password, wrong
username/password). Later the execute method of the corresponding Action
class "LoginAction" checks those ActionErrors. If not empty I try to
return a forward to "failure.jsp".


The problem I have is that before my LoginAction could execute my custom
forward the RequestProcessor of Struts tells in the logs, that validation
has failed and request will be forwarded to /login.jsp (which is of course
the input item of this action in struts-config.xml). When a validation
error occurs my LoginAction class is never called.


I searched the archive of this list already but couldnīt get through the
solutions I found there. I still donīt understand why this is happening
and what I can do to redirect to a custom failure.jsp.


Could someone please explain in newbie-style ;-) ?

Thanks & Regards!

Chris

---------------------------------------------------------------------
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