If I understand what you're asking, try setting validate="false" in your action
mapping so that validation is deferred to your action. Otherwise, Struts will
perform validation automatically and, as you've noticed, never invoke your
action if there are errors.

Another option would be to keep validate="true" (that's actually it's default
value), but change input="/failure.jsp" (or wherever else you want to forward
upon validation errors - it can even be another action).

Quoting Christian Schlaefcke <[EMAIL PROTECTED]>:

> 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

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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

Reply via email to