Thanks David and Wendy for your help but it doesn't seem to work.
I added manually validate in my execute method. It still validates if I
directly enter the url.
I am pasting part of my code for you to take a look and let me know where I
am going wrong. Thanks again!
--Struts config part--
<action path="/selState"
type="com.sami.view.SelStateAction"
name="selStateForm"
scope="session"
input=".selectState">
<forward name="success" path=".indianLandInfo"/>
</action>
---SelStateAction--
SelStateForm sform = (SelStateForm) form;
String isSubmitted = sform.getIsSubmitted();
if(isSubmitted == "Yes" || isSubmitted.equalsIgnoreCase("Yes"))
{
ActionErrors errors = sform.validate( mapping, request );
}
return mapping.findForward("success");
---JSP file---
<html:form action="selState.do" method="POST" onsubmit="return
validateSelStateForm(this);">
.....
.....
<html:hidden property="isSubmitted" value="yes" />
</table>
<html:javascript formName="selStateForm" />
</html:form>
--
View this message in context:
http://www.nabble.com/Question-about-Struts-validator-tf1851247.html#a5074217
Sent from the Struts - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]