How To Validate HTML Tag Using Struts 2
I have one JSP page I have action class Us
Solution 1:
You have to use some Struts2 tags. If you do not want to use <s:textfield>
tag then use <s:fielderror>
tag which renders field errors.
Solution 2:
The validation works fine on html tags, i.e. <form
<input
if the name attribute matches the fieldName
specified in the validation.xml
.
Solution 3:
No need to change conf anything. Just change all Struts <s:form>
tags to html tag <form>
and only add <s:fielderror> </s:fielderror>
in your code. It is perfectly working.
Post a Comment for "How To Validate HTML Tag Using Struts 2"