• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query regarding Dispatch Action

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following mapping in the struts-config.xml:

<action parameter="method" path="/customerView" type="com.nucleus.web.app.customer.actions.CustomerViewAction">

<forward name="custDetails" path="/jsp/customer/CustomerDetails.jsp"/>
<forward name="custAddress" path="/jsp/customer/CustomerAddress.jsp"/>
<forward name="custLocalData" path="/jsp/customer/CustomerLocal.jsp"/>

</action>

As seen from the mapping,CustomerViewAction extends DispatchAction and the JSP pages such as CustomerDetails.jsp,CustomerAddress.jsp,etc. are all view JSP pages.

My question is that is it compulsory to give the name attribute as part of the action element os shown above?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The name attribute is used by Struts to associate an action with an ActionForm. If you don't specify the name attribute, the ActionForm you receive as a parameter in the execute() method of your action class will be of type ActionForm, and will not be populated with any attributes. This is generally not what you want.
 
Shashidahanu Iyyanar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The action class will be used to display corresponding data from the database for the view JSP's.Data will be displayed in the JSP pages using Value Objects(VOs).Hence,is it required to specify a form name in case of view JSP's?Please reply to this as soon as possible.
Thanks in advance.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic