• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to get the action name..Struts2

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

How can i get the name of the action invoked in my action class so that i can control the behavior of my action class..

What would be the simplest way without having to implement and override etc..

O by the way, m working with Struts2
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you want to?

That information is contained in the ActionInvocation, but I can think of very few use-cases where this would be necessary, and fewer where it would be a good idea.
 
amol bakre
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
O well maybe i am not very good with struts..
What i wanna do is use the same action class to open a jsp form page without having to execute the processing logic contained within the action class.

That is an action class when invoked should just return success and open a jsp form page. however this is the same action class that is invoked (to process and call other services, insert data) after some data entry is done on the jsp form page and submitted to the server..

which is why i though that if there was a way to read the action name then the processing logic in the action class could be bipassed and executed for the case when form is submitted to it.
any suggestions on how to do this thing the simplest and the most efficient way..
 
reply
    Bookmark Topic Watch Topic
  • New Topic