This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to specify formbean in struts 1.2.9

 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Merril
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic