File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes ValidatorActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ValidatorActionForm" Watch "ValidatorActionForm" New topic
Author

ValidatorActionForm

Tim Vernon
Greenhorn

Joined: Apr 23, 2008
Posts: 2
I am using Struts 1.3.8 and there is no ValidatorActionForm class in package org.apache.struts.validator

Was this moved somewhere else? Where can i download the correct jar that contains this class?
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265

Tim,

ValidatorActionForm is in the struts-extras.jar. For more info, check out:
Struts Extras


There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Tim Vernon
Greenhorn

Joined: Apr 23, 2008
Posts: 2
Ok, I got the ValidatorActionForm to work. Now the problem is, I have multiple actions, 5, that all do the same validations of a form, then I have 5 more that do different validations on the same form. Is there any way I can specify this in the validation.xml so that I do not have to repeat the code for the actions that use the same validations?
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265

Tim,

Create one formBean for each set of validations, then map the actions to the relevant formBean.

In struts-config.xml, you can define multiple formBeans that are backed by the same type.

Look at struts-examples-1.3.8.war for examples.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ValidatorActionForm