Here is our validation.xml file
<form name="logonForm" >
<field
property="username"
depends="required" page="1">
<arg key="logonForm.username"/>
</field>
<field
property="password"
depends="required,mask" page="1">
<arg key="logonForm.password"/>
<var>
<var-name>mask</var-name>
<var-value>^[0-9a-zA-Z]*$</var-value>
</var>
</field>
</form>
And the jsp file
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>welcome page </h1>
<html:form action="/logon" >
<html:submit property="dosubmit" value="Clcik here" />
<html:hidden property="page" value="5"/>
</html:form>
</body>
</html:html>
second jsp
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>JSP Page</h1>
<html:form action="/logon" onsubmit="return validateLogonForm(this);" >
UserName <html:text property="username" size="16" maxlength="16" style="width:138px; height:19" />
Password <html
assword property="password" />
<html:submit property="submit" value="Go" />
<html:hidden property="page" value="1"/>
</html:form>
</body>
<html:errors/>
</html:html>
Despite of passing the page value as "5" , validation gets executed for the second jsp(both jsp's are using the same form).And we get the validation messages in the second jsp.
Our doubt is, will the value passed through page hidden element visible in validation.xml.Because the log in my form bean is not getting printed.