I am using Struts2.0, Tomcat5.5 on windows XP system.
I am trying to keep track of time taken by a action class. For this I am trying to use interceptor. I specify this in the strus.xml as
The interceptor is defined in the struts.xml as
Now the Interceptor code is as
As can be seen in the code I am trying two ways to get this timeTaken value to the result="success" JSP page
1. Via bean property i.e. private String ruleRunTimeTaken;
2. Via putting it in session attribute MyTime
Now in the result JSP I am trying to access this time taken as
Here the bean property way is not working at all. I am getting blank always. May be this is not the correct way to do it. Please suggest how to get the timeTaken value across to the JSP page from Interceptor class.
Now the session thing sometimes work sometimes not. i.e. sometime I get the timeTaken value and other time it is blank. I am really confused
Please help me understand this. Thanks in advance for taking time out to help me.