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 Scope Interceptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Scope Interceptor" Watch "Scope Interceptor" New topic
Author

Scope Interceptor

Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
Hi,

I am having some difficulty using scope interceptor. I have getter and setter for 'dBean' in my action class and I want to keep it in a session.

I have tried this:


I am using the above action to reset the form but its not working. What am I missing?


Nick
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I guess I'm a little confused; you want to keep something in session, but you're removing it from session after the action executes?
Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
Yes, this is because it is a wizard like form and in between if the user wants to reset the form then I should remove whatever was there in the session. or else save it.
Patrick Kok
Ranch Hand

Joined: Nov 12, 2009
Posts: 42
Nick Sher wrote:Hi,

I am having some difficulty using scope interceptor. I have getter and setter for 'dBean' in my action class and I want to keep it in a session.

I have tried this:


I am using the above action to reset the form but its not working. What am I missing?


Your form is rendered BEFORE your session "dBean" value is invalidate().
your form will never be reset at that way, if I understand you clearly.
Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
Ok, then how do I achieve what I want. I am unable to follow the documentation for this interceptor and could not find examples. Please help.
 
wood burning stoves
 
subject: Scope Interceptor