This is what's happening:

1) User submit form with invalid data to /Control.do
2) Struts finds action mapping for /Control.do and sees validate="true"
3) Struts call's the form's validate()
4) validate returns false
5) Since validation fails, Struts forwards to the "input" url
6) Go to step 2

There are several possible solutions:
1) Use a different action class to handle the invalid form, set its
mapping to validate="false"
2) Set validate="false" on /Control and validate manually
3) Use the same action class but different URL mappings
("/ControlInvalid",validate="false")

If you want to investigate (2) but you don't know how, check out
Rick's tutorial on http://www.learntechnology.net/validate-manually.do

Hubert

On 1/29/06, Karthik Manimaran <[EMAIL PROTECTED]> wrote:
> Yes. Tried the same and it works now.
>
> I got a different problem now though.
>
> The following action results in validation being called recursively
> resulting in server crash.
>   <action path="/Control" type="com.bofa.ecomm.snf.web.global.Control"
> name="privacyPrefForm" scope="request" validate="true" input="Control.do
> ?body=privacysecur_set_privacy_pref">
>    <forward name="success" path="/jsp/global/def.jsp"/>
>    <forward name="failure" path="/jsp/global/selectstate.jsp"/>
>   </action>
>
> If I remove the input attribute a server exception is thrown. How can I make
> a page submit to itself on validation errors?
>
>

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

Reply via email to