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 following are the steps to Let's configure a basic validation using Webworkworkflow, step by step.

Step 1

...

Write up a html form.

...

Create the input form.{snippet:id=basicValidation|javadoc=false|lang=xml|url=

...

struts2/

...

apps/showcase/src/main/webapp/WEB-INF/validation/quiz-basic.jsp}

Step 2

...

Write up Create the action class

...

Action class.{snippet:id=quizAction|javadoc=false|lang=java|url=

...

struts2/

...

apps/showcase/src/main/java/

...

org/

...

apache/

...

struts2/showcase/validation/QuizAction.java}

Step3:

Step 3

Create Write up the validators to be used. The validation.xml format is either <ActionClassName>-validation.xml or <ActionClassName><ActoinContextName>-<ActionAliasName>-validation.xml

...

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

...

struts2/

...

apps/showcase/src/

...

main/resources/

...

org/

...

apache/

...

struts2/showcase/validation/QuizAction-validation.xml}

Step 4

Make sure there is a result for "input" listed in the struts.xml for when the validation fails:

...

If you don't have this, you'll get a: "No result defined for action xxx.xxx.tutorial.HellowWorld and result input" error