This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I have a problem regarding the control when I am using struts..
I have a basection which has a excute() function and forwards the request to executeAction()(this is an abstract method in base class and implemented in other action classes) methods of other action classes which sub class this base action class.
Now the flow is like this: when a request is made the control goes to execute() of baseaction , the base action gets the forms and from there it tries to get/set some session variables...then the executeAction of the subclass action is called.
Everything works fine as long as the session is valid .once the session is invalid the control goes to action form then it is suppose to go to the base action but it does not....I am just wondering why is this happening...
I was following along until I got to the "once the session is invalid" part. You mean like when a user's session times out? Do you have some login/authentication in place on your application? If so then it might be that your container is intercepting the request. If not then your action should get called. Obviously anything that was on the session previously would no longer exist.
Joined: Jun 16, 2006
Tnanks for the reply. I was longing to see somebody helping me. Yes what I mean by saying "session is invalid" that sessions times out. Suppose the session MaxInactiveInterval is 10 mins and the user leaves the site and goes out for 15 mins. when he comes back and hit a request the error: java.lang.IllegalArgumentException: No bean specified is displayed on the browser. At the back end the control goes to the constructor and reset methods of the base action from and then nothing happens. I cannot see even the default construtor of the base action getting called.
Can you suggest something..
Joined: Jun 16, 2006
Regarding the interception I believe all the requests in struts are intercepted by the action servlet and this is what calls the action depending upon the mapping. As far as I know the action servlet first checks the form associated with the request and tries to populate the values in reset function and after it is done it then tries to call the action class.