Discussions

Web tier: servlets, JSP, Web frameworks: the validate attribute in struts action tag

  1. the validate attribute in struts action tag (1 messages)

    what does the validate attribute in struts action tag?

    thanks everyone :)
  2. Setting validate to causes the ActionServlet to invoke the validate method on the ActionForm object for that Action. To make use of it, you need to set it to true and override the ActionForm's validate method in you ActionForm subclass.

    If your validate method returns a non-empty ActionErrors object, then struts will not invoke the Action, instead it will go back to the original page (input) where you can then render the validation errors.

    HTH