Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 66452 invoked by uid 500); 2 Apr 2001 16:27:46 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 66438 invoked from network); 2 Apr 2001 16:27:44 -0000 Received: from mail1.superlink.net (209.236.128.96) by h31.sny.collab.net with SMTP; 2 Apr 2001 16:27:44 -0000 Received: (qmail 22626 invoked from network); 2 Apr 2001 12:27:44 -0400 Received: from 209.236.135.211.dialup.superlink.net (HELO wslc013.toddbiz.com) (209.236.135.211) by superlink.net with SMTP; 2 Apr 2001 12:27:44 -0400 Message-Id: <4.3.2.7.0.20010402122525.00ae4920@mail.superlink.net> X-Sender: tchaffee@mail.superlink.net X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Mon, 02 Apr 2001 12:28:31 -0400 To: tomcat-user@jakarta.apache.org From: Todd Chaffee Subject: Re: How to re-use a request scope bean? In-Reply-To: <004701c0b252$b1361d70$805b4181@damien> References: <3AB828DB.1A2B6E59@lbl.gov> <4.3.2.7.0.20010321102353.00adf2f0@mail.superlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Joe, I still haven't had a chance to try this yet, but I wanted to let you know that this seems like the right way to go and I appreciate the suggestion. - Todd Chaffee At 02:02 PM 03/21/01 -0800, you wrote: > > The ideal would be for me to be able to pass the existing request's bean >to > > the new request. Is this possible? > >Short of trying to serialize the object and encode it into the URLs on the >page, I don't know of a way of getting a request-scope object to survive >outside of the scope of the request (go figure!). > >I think my first try would be to write a "container" bean that would hold >all search results (either in the application scope or the session scope). >Whenever someone wanted a new search, the search container would handle the >process of making a new SearchResults object and it would merely pass back >some identifier that you could use to get it later: > > class="mypackage.SearchManager"/> > > property="newsearch" arg="hot teenage lesbian sluts" >class="mypackage.SearchResults"/> > > > > >Then, in your product_list.jsp, you'd have something to recall the results >based on their ID.... something like: > > class="mypackage.SearchManager"/> > > property="existingsearch" arg="<%= request.getParameter(\"searchid\") %>" >class="mypackage.SearchResults"/> > >Let me know if this helps, > >- Joe