Accessing cookies in php which are set in java web application

Posted by user866937 on Stack Overflow See other posts from Stack Overflow or by user866937
Published on 2012-06-09T22:30:07Z Indexed on 2012/06/09 22:40 UTC
Read the original article Hit count: 196

Filed under:
|
|

I am setting a cookie at the domain level on encrypted connection in Java web application running on tomcat and I would like it to be accessible in a php web application running on a same domain but different subdomain.

Java web application running on https://javaapp.mycompany.com
php web application running on https://phpapp.mycompany.com/subpath/index.php

From java, I am setting the cookie with following parameters:

Domain: .mycompany.com
Send For: Encrypted connections only
Expires: After 2 months
Path: /subpath
Name: __C
Value: 1

Dumping all the cookies from my php web application running on https, I do not see any cookies getting dumped by the php web application. Whereas if I set the cookies in Java for any type of connection, only then php web application is able to see them if I run the php app on http instead of https.

I believe php web app should be able to retrieve then cookies set for https only and for particular domain and all immediate sub-domains.

What am I doing wrong here?

Thanks in advance for the help.

© Stack Overflow or respective owner

Related posts about java

Related posts about php5