I have written below sample program for struts validation attached here. When I submit the form, the validation is not happening. Can anyone take a look and let me know what the issue was.
struts-config.xml
validation.xml
ApplicationResources
errors.suffix=
errors.required='{0} is required'.
errors.minlength='{0} can not be less than {1} characters'.
errors.range='{0} is not in the range {1} through {2}'.
exampleForm.name=Name
exampleForm.age=Age
web.xml
ExampleAction.java
Ex1.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<head>
<title>JSP for exampleForm</title>
</head>
<body bgcolor="cyan">
<center>
<html:form action="example1.do">
<html:errors/>
Name : <html:text property="name" />