| Author |
Accessing Cookie
|
G Vigna
Greenhorn
Joined: Jun 01, 2005
Posts: 11
|
posted

0
|
Hai, I have a web site that is developed using different technologies (php and java servlets) The login page is in php and the user info is stored in a cookie. There is a link in the php home page for servlet access. When I try to view the cookies using request.getKookies(), I do not get the php cookie set. Very rarely the cookie is accessible. Can any one help in solving this problem. Thx, Vigna
|
 |
Jeffrey Spaulding
Ranch Hand
Joined: Jan 15, 2004
Posts: 149
|
|
Do the PHP and the Servlet side use the same domain? Cookies are visible to the domain they were set with, you might check that.
|
 |
G Vigna
Greenhorn
Joined: Jun 01, 2005
Posts: 11
|
posted

0
|
|
Both belong to the same domain. Php runs in apache server and the servlet in tomcat that is accessed via apache server using connector
|
 |
Jeffrey Spaulding
Ranch Hand
Joined: Jan 15, 2004
Posts: 149
|
|
Hmmmm, check the Http Headers you get maybe the header information is lost on the way through the connector. HttpServletRequest.getHeadernames() & HttpServletRequest.getHeaders
|
 |
G Vigna
Greenhorn
Joined: Jun 01, 2005
Posts: 11
|
posted

0
|
Now when I try to print the header information. I get the cookie but the value differs. when printed using php it is APPSESSID= 6a8590cade7dde74997147a0eebb2778 Header cookie = JSESSIONID=4098D905AA7962BD04B0F9BB0BB3BCEA; APPSESSID=660b104c91eb2702bb1a062d65098a27 Some times only JSESSIONID gets printed. Can you please tell what would be problem?
|
 |
 |
|
|
subject: Accessing Cookie
|
|
|