This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation=false" Watch "validation=false" New topic
Author

validation=false

Sanjay Virkar
Greenhorn

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: 1506
Sure. You do not have to create one if there is no need for it.


Bosun (SCJP, SCWCD)
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. myAction.do).

One option would be to use the plain HTML <form> tag specifying "myAction.do" 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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validation=false
 
Similar Threads
Navigation Problem, Please Help me
Pitney Bowes Group 1 address validation Software integration with java application pr
Skip validation when form not submitted
count errors in jsp using validation framwork
problem in field validation