Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a cookie by its name

Status
Not open for further replies.

NJDrew

Technical User
Dec 21, 2001
31
US
Ok,
I have a servlet generated HTMl page that writes a cookie containing values pulled from an Oracle SQL database.And i'm trying to read the cookie with another HTML page wich is my home page to display the users information to let them know who they are logged in as.

Now the problem is that you can call a cookie by its name that was written by a different page as long as the page that writes the cookie is in the same directory as the page trying to read it. Now the servlet generated page is held in C:/windows/temporary internet files/ and the page trying to read the cookie is in d:/javawebserver1.1/public_html/ . Nothing can be put into the temp folder. The cookie call is actually in javascript, hoever the cookie is being created by a servlet. I already have a second cookie that is being called first useing document.cookie. Can anyone give me any other ideas on how to get this to work.

any help or suggestions would be much appreciated.
thanks
DREW "Mistakes are the portals of discovery"
James Joyce
 
You may be using the optional "path" parameter on the cookie creation, which is limiting it's visibility. If so, try removing the cookiename.setPath() call in the servlet that creates the cookie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top