You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits.
regards Leon On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
Hi - I have an application that does not work correctly when the browser does not accept cookies. I added some code that rewrites the query string the first time the app is entered to include a new parameter and then redirects to the app. I watch for that parameter and if I find it I check whether the session id is from a cookie. If it isn't I put up a "Sorry, you need cookies message" and exit. This solution is not optimal, since I am seeing a blank page the first time I try to get into the application. So my question is: Tomcat must ascertain whether the browser accepts cookies in order to decide whether to use cookies or URL rewriting. How does it do it? and can I check Tomcat to find out, too? Garey Mills Library Systems Office UC Berkeley The brain is not where you think --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]