• 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

Name of Dispatch

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have an action file by name ClaimAction and its extends DispatchAction. My question is: after I click submit on the jsp it comes to the appropriate dispatch action method. In this action method, I want to output its dispatch method. How do I output the dispatch method?

Please let me know. Thanks in advance.
Arun.

Here is the code:

public ActionForward accept(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
{
System.out.println("The dispatch method is:"+???);
return null;
}
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since the flow of execution got to this method by looking at the value of a certain property of the form bean (for example, the method property), why not just output that property?, as in:

MyActionForm myActionForm = (MyActionForm) form;
System.out.println("The dispatch method is:"+myActionForm.getMethod());
 
Luke Zechariah
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Merrill. have a blessed day.
 
reply
    Bookmark Topic Watch Topic
  • New Topic