-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Balazs,
Balazs Michnay wrote: > Thanks a lot for your help! It really does work! What I missed was > the validate="true" attribute of the action tag, however, this was > not mentioned by any of the articles I read. If it's not mentioned, you should point that out to the authors. I'm sure they would want to know about any oversights. > The other thing is that now, the validation error message DID show > up, but it is displayed on "destination-page" that should only show > up when the validation was successful.What I want to do is to show > the same for until valid values are not entered and when all the > necessary fields are filled with valid values, forward the user to > the "destination-page". If validation actually fails, it should be redirecting the user to the page mentioned in the "input" attribute of the <action> currently being executed. If validation has passes, but some other error has occurred, perhaps you are handling that situation incorrectly in your code. > Again, I'm missing some settings in my config files. You told me to > use the validate() method but now it's completely removed because all > the articles told me to remove it. Right. Under most circumstances, you should set validate="true" in your <action> definition, and /not/ call form.validate() in your own action. You /are/ free to call validation by hand, but it's generally more convenient to allow Struts to handle the validate/fail/redirect logic for you -- if only to simplify the code in your own actions. > <action input="/LP/JSP_L01_1.jsp" name="BEAN_L01" > path="/L01FormAction" scope="request" type="com.myapp.struts.ACT_L01" > validate="true"> <set-property property="cancellable" value="true"/> > <forward name="cancel" path="/index.jsp"/> <forward name="success" > path="/LP/JSP_L01_1.jsp"/> </action> I see the problem: "input" and "success" are set to the same page. Is that what you meant to do? I hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF9tly9CaO5/Lv0PARAm5yAJ9etlGCzbBFWnEK/oJCjZEcWhDZhACgvRXT W5VsZyEawBx79bfMgy4+qag= =V3DS -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]