ldbkutty
asked on
struts validation
I have a struts-JSP (say main.jsp) with a FORM which includes another JSP (page1.jsp) with a FORM.
I validate the page1.jsp FORM through struts-validation.xml
The problem is if i get any validation errors, i am getting only the page1.jsp with errors. I want to show the main.jsp even if there are any validation errors in page1.jsp.
As expected, if there are no errors, main.jsp is displyed.
i know how to do validation in my Form-Action but i want to use struts-validator. Can i do something with ValidatorActionForm in my Action class. If so, could you please tell me how?
Any suggestions?
I validate the page1.jsp FORM through struts-validation.xml
The problem is if i get any validation errors, i am getting only the page1.jsp with errors. I want to show the main.jsp even if there are any validation errors in page1.jsp.
As expected, if there are no errors, main.jsp is displyed.
i know how to do validation in my Form-Action but i want to use struts-validator. Can i do something with ValidatorActionForm in my Action class. If so, could you please tell me how?
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Whoops ;-)
This attribute 'input' is the page to return when error detected by struts validator.
Example:
<action path="/main"
type="SomeAction"
name="someForm"
validate="true"
input="/main.jsp"
scope="request">
What do you mean by "Can i do something with ValidatorActionForm in my Action class. If so, could you please tell me how?"?
Example:
<action path="/main"
type="SomeAction"
name="someForm"
validate="true"
input="/main.jsp"
scope="request">
What do you mean by "Can i do something with ValidatorActionForm in my Action class. If so, could you please tell me how?"?
ASKER
I mean we use 'ValidatorForm' in form-bean to override the the existing validate() method of form-beans with struts validator.
I dont know about 'ValidatorActionForm' ... Is it the similar to 'ValidatorForm', but for form-action class?
I dont know about 'ValidatorActionForm' ... Is it the similar to 'ValidatorForm', but for form-action class?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i think its not possible for my case. i went with validation in my action class. thanks for your time, though.
ASKER