Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Description

The followings show a simple example using Webwork's Field Validators

Step 1

Create the jsp page

...

.{snippet:id=visitorValidatorsExample|lang=xml|javadoc=false|url=

...

struts2/apps/showcase/src/main/webapp/WEB-INF/validation/visitorValidatorsExample.jsp}

Step 2

Create the actoin class

...

action class.{snippet:id=visitorValidatorsExample|javadoc=false|lang=java|url=

...

struts2/apps/showcase/src/main/java/org/apache/

...

struts2/

...

showcase/validation/VisitorValidatorsExampleAction.java}

Step 3

Create the validator.xml.

...

{snippet:id=visitorValidatorsExample|javadoc=false|lang=xml|url=

...

struts2/apps/showcase/src/main/

...

resources/org/apache/

...

struts2/showcase/validation/VisitorValidatorsExampleAction-submitVisitorValidatorsExamples-validation.xml}