Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 after action invoked

 
debraj mallick
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.
 
Mohana Rao Sv
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