Wow, I feel really stupid now! That's exactly it. Like finding that extra
; Thank you VERY much
-----Original Message-----
From: Shrisha Radhakrishna [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 28, 2000 4:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies
Is this is a typo? U R saying (!!!)
if ((cookies == null) || (cookies.length == 0))
{
%>
display cookies....
<%}%>
It should be...
if ((cookies == null) || (cookies.length == 0))
{
%>
Display "Cookies not found..."
<%}
else
{
Display all cookies...
}
%>
----- Original Message -----
From: "Beck, Matthew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 28, 2000 12:12 PM
Subject: Cookies
> I'm working with JSWDK 1.0.1 and have to simple JSP pages for testing
cookie
> reading and writing (copied below). I turn on warnings about cookies in
IE
> and can inspect the contents of the cookie coming down to my browser.
> However, when I look for cookies coming back to the server there are none.
> I'm suspicious that the problem is related to running on
> http://localhost:8080/ <http://localhost:8080/> rather than a "real"
> domain. Anyone seen similar behavior? Recommendations???
>
> -Matthew
>
> PutCookie.jsp:
> <%
> Cookie ts = new Cookie("CookieTime",(new java.util.Date()).toString());
> response.addCookie(ts);
> %>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFFFF">
> Sending Cookies
> </body>
> </html>
>
> GetCookies.jsp:
> <%
> System.out.println("Received page request");
>
> Cookie cookies[] = request.getCookies();
> %>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFFFF">
> <%
> if ((cookies == null) || (cookies.length == 0))
> {
> %>
> <p>Found <%=cookies.length%> cookies</p>
> <table width="100%" border="1">
> <tr>
> <td>Name</td>
> <td>Value</td>
> <td>Comment</td>
> <td>Max Age</td>
> </tr>
> <%
> for (int i=0; i < cookies.length; i++)
> {
> Cookie c = cookies[i];
> System.out.println("Name: " + c.getName() + " Value: " + c.getValue() +
"
> MaxAge: " + c.getMaxAge());
> %>
> <tr>
> <td><%=c.getName()%></td>
> <td><%=c.getValue()%></td>
> <td><%=c.getComment()%></td>
> <td><%=c.getMaxAge()%></td>
> </tr>
> <%
> }
> %>
> </table>
> <p> </p>
> <p> </p>
> <%
> }
> else
> {
> System.out.println("NO COOKIES FOUND");
> %>No Cookies Found<%
> }
> %>
> </body>
> </html>
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets