Thanks a lot!
But wht i'm doing so far is to get a request tehn instantiate a bean(bean1)
get the result, store it in another (bean2), then i display some of the
content of bean2(linked list) and add a next button so as to display the
rest of the bean2 in another page(the same that is reloaded)! what u said is
ok but what if the user enters another query will the content change of
bean2?
By the way i know some of sessions but i used to work with php!
>From: Kevin Duffey <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: passing ogjects from jsp to jsp
>Date: Thu, 21 Jun 2001 07:50:36 -0700
>
>Very simple. Store the result set in a bean with session scope. Then, all
>pages accessed by the same one user during the same one session (most
>servlet engines default 30 minutes of inactivity for a session before
>expiring it) can access this list. If your not familiar with "scope", its
>handy to know. There are basically 3 scopes with beans. Request, Session
>and
>Application. Request means the object exist for the duration of the request
>on the server (including forwarding to a JSP page..so you can have a
>servlet
>put an object in the request passed in, then forward to a JSP page that
>also
>has access to this same object. The engine then discards that object once
>the response goes back to the client). Session exists the entire time the
>user is using your site while their session is still kept alive. All pages
>they access can access this one object (or any object stored in the
>session). Application scope is dangerous but sometimes useful. Its a GLOBAL
>scope that all sessions can use. Therefore its not thread-safe. It is
>useful
>for lookup objects, or routines that are used by many pages for many
>sessions at the same time. But remember, do not put any methods in an
>object
>that can be "written" to at the same time without first syncronizing the
>method(s).
>
>So to store something for the next page to access, you do something like:
>
>request.getSession(true).setAttribute("AttributeName", object);
>
>On the following page, you will have to typecast the object to the right
>type:
>
>MyObject myObject = (MyObject)
>request.getSession(true).getAttribute("AttributeName");
>
>If this hasn't helped, elaborate a bit more and I'll see what I can do.
>
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of kaab kaoutar
> > Sent: Thursday, June 21, 2001 3:48 AM
> > To: [EMAIL PROTECTED]
> > Subject: passing ogjects from jsp to jsp
> >
> >
> > Hi!
> > I have a jsp files that generates a linked list by the bean that are
> > instantiated there!
> > iwant the next page to get that linked list and display some of the
>liked
> > list then call itself with an argument so as to display the rest
> > and so on !
> > The main problem is how the second page can use the result es
> > linked list of
> > the first page
> > Thanks
> >
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
> >
> > ==================================================================
> > =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> > JSP-INTEREST DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets