struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Re: action.xml
Date Thu, 01 Feb 2001 17:15:15 GMT
On 2/1/2001 at 9:03 AM John Hunt wrote:
> Is there a to remove the bean from the session scope after the
purpose is solved. 

Yes. You can remove the same as any other bean. If a new one is needed
later, Struts will create it again. Here's a snip from the example

	// Remove the obsolete form bean
	if (mapping.getAttribute() != null) {
            if ("request".equals(mapping.getScope()))

> If it is retained is it a browser property or is it because of form

Sounds like the browser is cacheing it. There's a HTTP pragma to defeat
that when inapproriate. 

> If it doesn't retain and we want it to be retained, then should we
put such form beans also under session scope???

If you want to the form's data to be persistent throughout the session,
then make it a session bean. If it doesn't matter, save the resoruces
and keep it in request scope. 


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.

View raw message