Followup question: If I use the same action class to handle both the form rendering and submission, how do I avoid validation on the rendering phase? I use the HTTP method to tell whether it is a form submission or not. My problem is validation error shows up on the initial form displaying. Do I have to have two actions in this scenario?
-----Original Message----- From: Zheng, Xiahong Sent: Wednesday, February 13, 2008 2:55 PM To: Struts Users Mailing List Subject: RE: [S2] : Help with annotated validation That's indeed what I am missing. Thanks for your prompt help. -----Original Message----- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 2:48 PM To: Struts Users Mailing List Subject: Re: [S2] : Help with annotated validation --- "Zheng, Xiahong" <[EMAIL PROTECTED]> wrote: > My annotated validation doesn't happen. The following are the code > snippets for action class and config files. When I leave the SSN field > blank and hit submit my action's execute method is called hence fails > instead of redisplay of the login page again with validation error > message. What am I missing here? > [...] > <action name="login" class="my.pacakge.LoginAction"> > <result>home</result> > <result name="failed">loginError</result> > <interceptor-ref name="autowiring"/> > <interceptor-ref name="params"/> > <interceptor-ref name="validate"/> > <interceptor-ref name="workflow"/> > </action> Do you have an "input" result defined? If you have logging turned up you should see a reference to the inability to find an "input" result, which is where the "workflow" interceptor will go to when there are validation errors. Dave --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]