struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chiji nwankwo" <>
Subject Removing bean from session scope
Date Wed, 29 Aug 2001 09:12:12 GMT
<html><div style='background-color:'><DIV>
<P>Hi Andre,</P>
<P>I picked up on something you said in your message yesterday about removing a bean
from session scope.&nbsp; I have 2 pages in my application, the first page (archive.jsp)
consists of select boxes, which populate each other without having to click on a submit button
and the second page (results.jsp) which displays a list of the user's selection, when a link
has been clicked.&nbsp; </P>
<P>After the user has clicked on the link, which takes to them to the results page I
want to be able to reset the contents of the form so that if the user clicks on the back button,
the contents of the form would have been re-initialized.</P>
<P>Removing the bean from session scope I feel might be the answer to my problem.&nbsp;
<P>Thanks for your help.</P>
<DIV></DIV>&gt;From: "Paradis, André" <ANDRE.PARADIS@VERSALYS.COM>
<DIV></DIV>&gt;Subject: RE: Validation FW: Displaying messages passed the
<DIV></DIV>&gt;Date: Tue, 28 Aug 2001 14:12:00 -0400 
<DIV></DIV>&gt;MIME-Version: 1.0 
<DIV></DIV>&gt;Received: from [] by (3.2) with ESMTP
id MHotMailBD552B5A000640042A1A407D85140FDB0; Tue, 28 Aug 2001 11:18:02 -0700 
<DIV></DIV>&gt;Received: (qmail 31125 invoked by uid 500); 28 Aug 2001 18:10:05
<DIV></DIV>&gt;Received: (qmail 31115 invoked from network); 28 Aug 2001 18:10:05
<DIV></DIV>&gt;Received: from unknown (HELO (
by with SMTP; 28 Aug 2001 18:10:05 -0000 
<DIV></DIV>&gt;From struts-user-return-16203-cn081 Tue, 28 Aug 2001 11:18:32
<DIV></DIV>&gt;Mailing-List: contact;
run by ezmlm 
<DIV></DIV>&gt;Precedence: bulk 
<DIV></DIV>&gt;list-help: <?xml:namespace prefix = mailto /><>
<DIV></DIV>&gt;list-unsubscribe: <>
<DIV></DIV>&gt;list-post: <>
<DIV></DIV>&gt;Delivered-To: mailing list 
<DIV></DIV>&gt;content-class: urn:content-classes:message 
<DIV></DIV>&gt;X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 
<DIV></DIV>&gt;Message-ID: &lt;;

<DIV></DIV>&gt;Thread-Topic: Validation FW: Displaying messages passed the
<DIV></DIV>&gt;Thread-Index: AcEv605KurbJYeuOSwuc1jYIkl+krwAANFUQ 
<DIV></DIV>&gt;X-Spam-Rating: 1.6.2 0/1000/N 
<DIV></DIV>&gt;Doing a redirection causes a new request to be created, thus
you loose 
<DIV></DIV>&gt;everything you put in the previous request object. You could
save your 
<DIV></DIV>&gt;messages in user session scope, then do your redirection. The
next page 
<DIV></DIV>&gt;will have access to the user session and you'll be able to
read those 
<DIV></DIV>&gt;messages. After messages are read, you can remove the bean
from session 
<DIV></DIV>&gt;scope in order preserve memory on the server. 
<DIV></DIV>&gt;Andre Paradis 
<DIV></DIV>&gt;-----Original Message----- 
<DIV></DIV>&gt;From: Matt Raible [] 
<DIV></DIV>&gt;Sent: Tuesday, August 28, 2001 2:01 PM 
<DIV></DIV>&gt;To: Struts User 
<DIV></DIV>&gt;Subject: Validation FW: Displaying messages passed the request

<DIV></DIV>&gt;I have a SaveAction that sets up some success messages using:

<DIV></DIV>&gt;messages.add(new ActionMessage(""));

<DIV></DIV>&gt;saveMessages(Constants.MESSAGE_KEY, request, messages); 
<DIV></DIV>&gt;And upon this save, the findForward("success") forwards to
<DIV></DIV>&gt;action class with: 
<DIV></DIV>&gt;<FORWARD DIV <>&gt; name="success" 
<DIV></DIV>&gt; path="/do/editTimesheet?action=Edit" redirect="true" /&gt;

<DIV></DIV>&gt;But on the JSP after, there are no messages displayed. I know
<DIV></DIV>&gt;answer why, and that is because "redirect=true". However, this
is the 
<DIV></DIV>&gt;only way I can forward to another action class in iPlanet.

<DIV></DIV>&gt;Anyone know of a workaround to carry these messages into the
next page? 
<DIV></DIV>&gt;Can I check the request in "editTimesheet" to see if messages
exist, and 
<DIV></DIV>&gt;if so - add them to the request again? 
clear=all><hr>Get your FREE download of MSN Explorer at <a href=''></a><br></html>

View raw message