> 2) Anyone know f it is possible to use cookies in JSP (rather
> than a servlet)

Not directly (i.e. there are no soecific JSP constructs). However JSPs are
just servlets, so you can use them in script very easily,

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
> Daniel Lynn
> Sent: 20 January 2001 13:21
> To: [EMAIL PROTECTED]
> Subject: Re: cookies
>
>
> Hey, funny, I was just going to post something about how cookies
> function. (a
> question that is)
>
> Anyway, I'm wondering:
> 1) anyone know an easy-to-understand tutorial for learning how to
> use cookies in
> your code?
>
> 2) Anyone know f it is possible to use cookies in JSP (rather
> than a servlet)
>
> Thanks much,
> Daniel
>
>
> Manomohan K Kalathil wrote:
>
> > Hi Satheesh,
> >         First, please avoid all caps in your mail. It is called
> "Shouting".
> > Now to the original problem,
> > Cookies are used by Server side resources to store data about
> the client.
> > Servlets also use cookies to achieve session management. When a
> server wishes
> > to set a cookie on a client, it needs to pass the cookie as a
> part of a HTTP
> > Header called Cookie
> > For example when an app server wants to set a session cookie on
> to a client ,
> > it adds a header in the response. As in:
> >
> > Set-Cookie: JSESSIONID=EGLFKMNGIBHK; Path=/
> >
> > Where JSESSIONID is the name of the Cookie , EGLF.. is its
> value and Path
> > specifies the request paths on this server for which the client
> is to return
> > this cookie.
> >
> > Now when the client accepts this cookie , it is expected to return this
> > cookie to the server for every request that begins with Path (
> in this case
> > /) It does so by adding this line as a part if the HTTPheader
> in each request
> >
> > cookie: JSESSIONID=EGLFKMNGIBHK;
> >
> > HOpe this gets you started on figuring out the rest .
> >
> > Cheers
> > Mano
> >
> > -----Original Message-----
> > From: Satheesh Naidu [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, January 20, 2001 3:39 AM
> > To: [EMAIL PROTECTED]
> > Subject: HOW COOKIES FUNCTION?
> >
> > Hi friends,
> >            Can anybody explain me how the cookies are implemented in a
> > Servlet container.
> > what about the browser support/role.
> >
> > I am using Tomcat as Servlet container.
> > My intention is to know how it is implemented in the container/browser.
> >
> > I have following doubts,
> >
> > 1. When a new cookie is created , how server intimates to client.
> >    I was expecting that the container will insert something
> like below in
> > the HTML file.
> >
> >    <META HTTP-EQUIV="SET_COOKIE"
> > CONTENT="cookiename=AKGF65THVGH;path=/;expires=Thur,18-Jan-2001 12:00:00
> > GMT">
> >
> >    But When I checked in client browser(through view source) I
> did not see
> > anything like that.
> >
> >    Is there any other way?
> >
> > 2. When client sends back the cookie value to server, how it
> will do this?
> >    I was under the impression that it will go as part of GET request.
> >
> > Please somebody can help me.
> >
> >
> __________________________________________________________________
> _________
> > 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
>
> __________________________________________________________________
> _________
> 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

Reply via email to