File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts2 after action invoked Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 after action invoked" Watch "Struts2 after action invoked" New topic

Struts2 after action invoked

debraj mallick
Ranch Hand

Joined: Mar 08, 2011
Posts: 188

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

Joined: Aug 01, 2007
Posts: 485

Write a method and annotate it @After after your action execution that method will be executed for further details refer the link and make sure that you added annotations interceptor.

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
I agree. Here's the link:
subject: Struts2 after action invoked
It's not a secret anymore!