You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Apache Wiki <wi...@apache.org> on 2005/04/20 10:55:54 UTC
[Struts Wiki] Update of "StrutsCatalogUsingValidate" by NiallPemberton
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.
The following page has been changed by NiallPemberton:
http://wiki.apache.org/struts/StrutsCatalogUsingValidate
------------------------------------------------------------------------------
Because validate() is the last method called on the form bean before calling action class, the validation functionality can be done in the action class. So, for simplicity sake, do not use validate() at all, forget that this method exists. This is Nature's mistake.
+ ----
+ Your assertion that you cannot use re-direction with the ''input'' attribute is '''incorrect'''. You can [http://struts.apache.org/userGuide/configuration.html#controller_config Configure Struts] so that ''the input attribute of an <action> elements is the name of an Action Forward'' - which you can be set to re-direct. ''niallp''
+
+ ''In the struts-config.xml''
+ {{{
+ <controller inputForward="true" />
+
+ <action path="..." input="myInput" validate="true">
+ <forward name="myInput" path="..." redirect="true" />
+ </action>
+ }}}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org