setValue is deprecated, setAttribute is the one to use,
Kevin Jones
DevelopMentor
www.develop.com
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Andrés Wagner
> Sent: 07 January 2001 18:08
> To: [EMAIL PROTECTED]
> Subject: Re: Comunication between two Servlet
>
>
> The putValue method is new to me, what I have is this
>
> if (myList == null)
> {
>
> getServletContext().setAttribute("burrano.MyLinkedList",myList
> =readList());
>
> }
>
> UserList
> =(MyLinkedList)getServletContext().getAttribute("burrano.MyLinkedList");
>
> Is this Ok? I found that in every servlet I want to mantain
> comunication, must initialize the MyLinkedLIST Object and then the
> servlets establish the comunication... is this true or is my point of
> view wrong?
>
> >Hey!
> >
> >If you are running an HTTPSession, then you can put the ListaNoticias
> >in the session in one servlet and pull it out in the other
> servlet or JSP.
> >
> >You might have code like this in your servlet:
> >
> > session.putValue("noticias.lista", lista);
> >
> >then in your JSP, which is another 'servlet', loosely:
> >
> >LinkedList theLista = (LinkedList)
> session.getValue("noticias.lista", lista);
> >
> >There is much code missing above. If this does not look familiar
> >to you, then I suggest some study on HTTPSessions.
> >
> >Sans adieu,
> >Danny Rubis
>
> --
> __________________________________
> Andrés Wagner Acuña
> Estudiante Ing. Civil Industrial
> Universidad Adolfo Ibañez
>
> ICQ: 39542425
> __________________________________
>
> "Programing today is a race between software engineers striving to
> build bigger and better idiot-proof programs, and the universe trying
> to produce bigger and better idiots...
> ...So far the universe is winning".
>
> -Rich Cook
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html