File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts control problem.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts control problem.." Watch "struts control problem.." New topic
Author

struts control problem..

Vivek Roy
Greenhorn

Joined: Jun 16, 2006
Posts: 11
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...

Can anybody please help me..


Thanks
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
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.

- Brent
Vivek Roy
Greenhorn

Joined: Jun 16, 2006
Posts: 11
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..
Vivek Roy
Greenhorn

Joined: Jun 16, 2006
Posts: 11
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts control problem..