Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Struts2 after action invoked

 
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i need to log the action name once it is invoked, to do this i am using intecptor which is like

my struts.xml is like


this does not work when i am getting any exception because action log is also saved, all i need to implement is: if the action is invoked successfully then only the action name will be save otherwise not.
I didn't understand what i am missing, Any suggestion would be great.
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Write a method and annotate it @After after your action execution that method will be executed for further details refer the link http://struts.apache.org/2.0.9/struts2-core/apidocs/index.html and make sure that you added annotations interceptor.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!