Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to retreive saved cookies  RSS feed

 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Sorry if this question is coming again, but I have tried to search the same question in JSP forum. But unfortunately I didn't find it.

Anyways, my question is, Is there any way through which we can retreive all the saved cookies in the System through JSP/JAVA.
 
Stefan Evans
Bartender
Posts: 1836
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the saved cookies where?

You can access all the cookies that relate to YOUR web site.
You don't have access to any other cookies via HTTP.
Java is running on the server, and can not access the client file system to read the cookies.

So my answer to your question would be: No.
You can not access all the saved cookies on someones system via JSP/Java.
You might be able to do it via a signed applet, but you would have to read the client file system to get at the cookies.
IMO - there are better solutions to this than JSP.
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stefan Evans:
All the saved cookies where?

So my answer to your question would be: No.

IMO - there are better solutions to this than JSP.


So can you throw some light on other better solutions. ?
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please elaborate on what it is you are trying to do and perhapes we can help. Reading all the cookies on a client machine sounds like an attempted security violation. More details please
 
Tony Smith
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the cookies or just certain specific ones your program wrote? If you are using windows, they might be stored in your temporary internet folders. But the content of those cookies from public website like amazon, yahoo, google will be completed useless to you. Here is an example of what the cookie might look like:

tv_interstitial3www.tv.com/153673568652829878782421609032029878580
*rsi_ct2007_8_28:3www.tv.com/160063568652829878782422307032029878580*

Why would you want to read something like that?

[ September 28, 2007: Message edited by: Tony Smith ]
[ September 28, 2007: Message edited by: Tony Smith ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!