The Artima Developer Community
Sponsored Link

Java Answers Forum
cookie does not print all the cookie information

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sid Northfield

Posts: 20
Nickname: northfield
Registered: Aug, 2002

cookie does not print all the cookie information Posted: Sep 5, 2002 1:04 PM
Reply to this message Reply
Advertisement
<p>I have a file "multiplevalues.jsp"<br>
I want to print the name and values of cookies, but it only ever prints one cookie<br>
information. I know I have more than one cookie.<br>
<br>
Question: Does IE store cookies in Windows\Temporary Interner files?<br>
<br>
If so than I diffinitely have more than one cookie in this folder?<br>
<br>
If not where is the cookie being stored?<br>
I am using:<br>
Windows OS, IE browser, Tomcat Webserver.<br>
<br>
<br>
<br>
&lt;html><br> ;
&lt;head><br>
&lt;title> Read multiple values from cookie &lt;/title><br>
&lt;/head><br>
&lt;body><br >
<br>
The following cookies has been located on your computer:<br>
&lt;br>&nbsp;<br>
&lt;%&nbsp;<br>
Cookie[] cookiesFromClient = request.getCookies();<br>
<br>
for ( int i = 0; i &lt; cookiesFromClient.length; i++ )<br>
{<br>
out.print(cookiesFromClient.getName() + " has a vlaue of ");<br>
out.print(cookiesFromClient.getValue() + "&lt;br>");<br>
}<br>
%><br>
<br>
&lt;/body><br>
&lt;/html><br& gt;
------------------------------------------------------------------<br>
Here is the output:<br>
<br>
The following cookies has been located on your computer:&nbsp;<br>
JSESSIONID has a vlaue of q7ewamk7u1</p>

Topic: when we seee a bean ,how can we say the it is a bean Previous Topic   Next Topic Topic: Java 2D: how to move drawn shape when image is rotated

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use