struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Gonzalez Gomez <>
Subject Re: How do you keep your session junk free?
Date Fri, 07 Mar 2003 12:23:15 GMT

    A few years ago, when Struts was not still available, we programmed 
a web layer framework much more primitive than Struts but with similar 
functionality for the project I was involved. One of the functionalities 
we had was request flow control, so we were sure that the user wasn't 
going back and forth and we had the right information in the session. 
Whenever there was a request that was not proper following the current 
flow, a message error was showed to the user, with the suggestion to 
begin the flow again.

    We didn't reach that far, but I think such a functionality may 
provide a way to define "wizards" or page flows and let the application 
have a callback method to clean the session stored in data in case the 
user leaves the wizard. This is a functionality that I'd love to have in 
Struts. Right now, I try to clean the session when I reach the final 
step of such a series of pages, but you are not guaranteed that the user 
ever reaches it.

    The other solution is having all the data introduced so far by the 
user in hidden fields (though I don't recommend it).


Jörg Maurer wrote:

>AFAIK, why not put form bean in hashtable under well known name in
>application scope - last resort, cause as you mentioned request not
>applicable, session not available.... you are in full charge of form
>bean. populate that bean in application scope as you like from newly
>created form bean or replace it all at once. Have to e.g. prepend key
>with user information(getSessionID()) to get same bean for user back?
>Greets Jörg
>-----Original Message-----
>From: julian green []
>Sent: Freitag, 07. März 2003 10:33
>To: Struts Users Mailing List
>Subject: How do you keep your session junk free?
>How do you prevent the session from filling up with junk from previous 
>screens?  Or to put it another way:
>I have written some screens that have to store the form bean in the 
>session scope as each screen is interconnected and uses the same 
>instance of the form bean.   If I change the scope to request a new form
>bean is created for each screen (every time a jsp file is rendered).  Is
>there a way of implementing multiple screens with the same form bean 
>with a request scope?
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message