If there are more than one cookies passed to your servlet, you can use the
following code to retrieve all cookies
, here req is used for request object
Cookie[] cookies = req.getCookies();
if(cookies != null){
for (int i=0; i < cookie.length;i++)
String name = cookies[i].getName();
String value = cookies[i].getValue();
}
}
I have copied this code from book JAVA Servlet Programming (Page 203).
Hope this will help
Baig
guillaume ORIOL <[EMAIL PROTECTED]> on 03/30/2000 12:15:36 PM
Please respond to "A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology." <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Imran Baig/CresSoft)
Subject: communication between servlet and PHP
hello,
here's my problem:
the team I am working in is building a web site
using differents technologies, and especially Java servlets.
We are using two different languages : Java and PHP3.
The problem is that we need user authentication
thru login/password. Once the login has been performed
in Java and a session cookie has been set, I know how to
get the cookie in PHP3 but I don't know how to get the data associated with
that cookie? Or in the opposite, how can I get with Java the information
associated with a cookie which has been set in PHP?
thanks in advance
guillaume ORIOL
___________________________________________________________________________
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