----- Original Message -----
From: Marc Krisjanous <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 17, 2000 9:04 AM
Subject: Session testing question
> Hi all,
> I have a shopping cart Servlet. The Servlet stores the shopping cart in
the
> session object and the JSP pages accesses the session shopping cart. Now
> that I have completed the code I was thinking about the situation where
the
> client could deny cookies. Now I have tested this on IE5 (disabling
cookie
> acceptance) and my Servlet does not work! It treats each session access as
> new. The question I have is:
>
> How can I check to see if cookies have been disabled and if so what can I
> use to still use the shopping cart??
You can use this class http://www.purpletech.com/code/CookieDetector.html
or write your own like it.
>I have heard of URL rewriting? Could I
> use this instead of storing the shopping cart in the session object if
> cookies are disabled?
>
You can not use URL rewriting instead of sessions, URL rewriting
is method of support of sessions without cookies, so you can
use sessions even if cookies is disabled on client.
See here http://novocode.de/doc/servlet-essentials/chapter2c.html
for more details.
Vyacheslav Pedak
===========================================================================
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