aspose file tools*
The moose likes Struts and the fly likes how to specify formbean in struts 1.2.9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to specify formbean in struts 1.2.9" Watch "how to specify formbean in struts 1.2.9" New topic
Author

how to specify formbean in struts 1.2.9

sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
hi all
in struts 1.1 we will specify formbean name in form tag as follows

<html:form action="Lookup" name="lookupForm" type="com.LookupForm">

name=it will look for an appropiate formbean. Its main purpose is to pass form data between view and controller components.

type-fully qualified classname of the form bean which is used in this request.

but in the case of struts 1.2.9 name and type attribute of form tag has been depricated then how to specify formbean in this version

thanks in advance
saiprasanna
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Even in version 1.1, the name and type attribute of the <html:form> tag were optional. If you specify the action attribute of this tag, you've told Struts all it needs to know. Given the action mapping, it can find the configuration for the action and form bean that you created in the struts-config.xml file. The type and name of the ActionForm bean are already defined there, so there's no need to define them again in the <html:form> tag. It's just cleaner to have the configuration all in one place and not duplicated.


Merrill
Consultant, Sima Solutions
sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
thanks Merril
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to specify formbean in struts 1.2.9
 
Similar Threads
Use form bean in more than one action method
problem with validation
Deploy time exception - Key Attribute required for element exception
Struts:FormBean issue with html:select tag
How to submit a form with out a name in javascript