Hi,
See any servlet-related book (see Jason Hunter's message-footers), but hey,
even Sun's servlet docs and apidoc might help (they helped me, I hope ;-)
Or seek "Resources:" string at bottom of any message from this list!
You can keep Objects within same session, using HttpSession.getValue(String)
.putValue(String,Object), .removeValue(String) calls.
In JSDK 2.1 you can share Objects betwen all sessions and servlets using
similar calls within ServletContext - .getAttribute(),
.setAttribute(), .removeAttribute()
If you run a previous version of JSDK you can use public static methods or
variables, to share global Objects betwen all servlets and sessions
(except for few distributed, multiple JVM, servlet-engines).
Cezar
On Fri, 16 Apr 1999, David S. Soleno wrote:
> Is it possible to pass object references between servlet invocations?
>
> For instance,
> If a user invokes my servlet from a browser my servlet uses helper
> classes to instantiate an Object (from a custom class) that encapsulates
> information about that particular request. My servlet then outputs an HTML
> page that contains a link at the bottom which allows the user to
> 'continue'. The 'continue' link just reinvokes my servlet with different
> parameters to respond differently. What I really need to do is have the
> Object created in the first invocation persist through the second
> invocation and then give the second invocation of the servlet a reference
> to it. Is this possible? Perhaps with the Session objects? I'm
> inexperienced with Session objects so is someone could help me get going in
> the right direction it would be much appreciated.
>
> David S. Soleno
> SciberNet, Inc.
> Tel: (619) 824-0840
> Fax: (619) 824-0846
> e-mail: [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> 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
>
Cezar Totth email: [EMAIL PROTECTED]
Fax: (401) 220 33 95
Genesys Software Romania Phone: (401) 638 49 44
Stefan Furtuna 169, sect.6
cod 77171, Bucharest
Romania
___________________________________________________________________________
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