Hi Suresh,
Strange problem yu have there, i think this is directly not
possible, you will have to i think use a ServletInputStream to read and
parse the data stream from the CGI script and figure out that a cookie has
been sent and based on that parsed information you will have to use
addCookie method of the HttpServletResponse.
For the format of cookie i suggest you search the RFC's where you
can find the information for the cookie specfications and how it is
transmitted.
Regards
munsingh
May the Force be with you
> -----Original Message-----
> From: Suresh [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 03, 2001 1:53 PM
> To: [EMAIL PROTECTED]
> Subject: Passing Cookies from CGI to Servlet
>
> Hi
>
> I got the following problem. If you have any idea please help me!
>
> Thanks
> Soumendu
>
> Between my browser and CGI(Perl) I have a servlet as a go-between. (I have
> no reason to explain as
> to why the architecture is such). The servlet simply takes data from
> browser and passes it on to the
> CGI and
> the reverse. The servlet is basically a gateway between the browser and
> the CGI. The first time I
> submit I create a cookie in the CGI and this cookie has to be passed to
> the browser via the servlet.
> Except for the
> Cookie information I have been able to get all other information to and
> from servlet. Now, I have
> found no method that would actually receive the cookie from the CGI into
> the servlet. Please donot
> tell me that
> the method is getCookie (for it gets cookie from browser). Can someone
> enlighten me on this?
>
> __________________________________________________________________________
> _
> 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