RE: Javascript and cookie

2004-10-12 Thread Shapira, Yoav
Hi,

Cookies you can test: simply write one, sendRedirect, and try to read
it.  If it works, then you know the browser supports cookies.



Detecting whether JavaScript is enabled can be done in a similarly
tricky way, by including some JavaScript in a response that pings a
server URL of your choice.  If the URL is pinged, it can set a session
attribute indicating JavaScript is enabled.



These are of course fragile approaches, as the user can change either
cookie support or JavaScript settings in the middle of his/her session.



The Servlet API itself doesn't offer programmatic hooks to do this,
because your apps should work fine with or without these services, at
least according to the spirit of the Servlet Spec.



Yoav Shapira



-Original Message-

From: Carlos Bracho [mailto:[EMAIL PROTECTED]

Sent: Saturday, October 09, 2004 8:25 PM

To: Tomcat Users List

Subject: Javascript and cookie



Hi everybody...



Can I know if the browser has cookies and javascript set as enable? of

course using jps or servlet.



Regards

Carlos

--

--

 Carlos J, Bracho M.

 The significant problems we face cannot

  be solved at the same level of thinking

  we were at when we created them.

  Albert Einstein

--

 e-mail:  [EMAIL PROTECTED]

 MSN:[EMAIL PROTECTED]

--



-

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]






This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.



Javascript and cookie

2004-10-09 Thread Carlos Bracho
Hi everybody...

Can I know if the browser has cookies and javascript set as enable? of
course using jps or servlet.

Regards
Carlos
-- 
--
 Carlos J, Bracho M.  
 The significant problems we face cannot
  be solved at the same level of thinking  
  we were at when we created them.  
  Albert Einstein   
--
 e-mail:  [EMAIL PROTECTED]
 MSN:[EMAIL PROTECTED]  
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]