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


Sanjay Virkar

Joined: Apr 03, 2005
Posts: 19
Do we have to create form bean even when you don't need it?

On my form I have only one button and no data entry field so no need for validation. Can I bypass creation of the ActionForm completely?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Sure. You do not have to create one if there is no need for it.

So much trouble in the world -- Bob Marley
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Bosun's statement needs to be qualified a bit. While it's true you can have an Action without an ActionForm defined for it, you cannot specify such an action in an <html:form> tag. You can only call such an action as URL (e.g.

One option would be to use the plain HTML <form> tag specifying "" as the action. If you still want to use the <html:form> tag but don't want to create an Action form, simply declare the DynaActionForm class as the Actionform.

Consultant, Sima Solutions
I agree. Here's the link:
subject: validation=false
It's not a secret anymore!