You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cavan Morris <ca...@worldnet.att.net> on 2002/06/04 06:42:01 UTC

Detect Cookie Rejection

Does anyone know of a way to detect when cookies are not accepted by a browser.  My site uses session cookies and I'd like to be able to redirect people somewhere to tell them that the site requires cookies and what to do to activate them...

I'm sure that someone else has already solved this problem.  Any ideas?

Cavan Morris


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


AW: Detect Cookie Rejection

Posted by "Power-Netz (Schwarz)" <sc...@power-netz.de>.
> Does anyone know of a way to detect when cookies are not accepted
> by a browser.  My site uses session cookies and I'd like to be
> able to redirect people somewhere to tell them that the site
> requires cookies and what to do to activate them...

An easy way to find out if cookies are enabled AND working is
to set something in a bean scope=session , refresh to a different side
and check if the session.isNew()=true or if the usedbean has reconstructed
( singleton counter )

why?

session.isNew() will allways return true, because the session can't not be
tracked without the cookie
(ofcourse only if you are NOT USEING urlEncode() ) [That's what i learn from
last weeks posting :-)]

Your bean will be constructed because the session is new. new session -> new
beans.

Make something out of it.. :)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


tomcat n apache

Posted by puneet sachar <pu...@yahoo.com>.
sir..

tell me what is tomcat and apache..
what is the difference b/w both..

where we can use tomcat and where apache..

regards
Puneet

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: tomcat vs ant vs j2me

Posted by Prabhakar Chaganti <pr...@chaganti.net>.
Ant is an xml based build tool. Can also do a lot of other stuff. try	http://jakarta.apache.org/ant/ for more details. Tomcat is a webcontainer!! 

-prabhakar

> 
> tell me what is this tomcat ant...
> 
> 1) is it software 
> 
> r extra utility...which added to taomcat
> 
> and where to install it
> 
> whatz difference b/w this and tomcat ..and what will
> added advantages
> 
> 3) my j2me program don't work with tomcat
> actullay trying to make a small application which will
> send sms to mobile ..
> 
> does anyone have program for that do send me
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


tomcat vs ant vs j2me

Posted by puneet sachar <pu...@yahoo.com>.
good morning developers


tell me what is this tomcat ant...

1) is it software 

r extra utility...which added to taomcat

and where to install it

whatz difference b/w this and tomcat ..and what will
added advantages

3) my j2me program don't work with tomcat
actullay trying to make a small application which will
send sms to mobile ..

does anyone have program for that do send me

thanx a lot ..

Regards
Puneet

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


oracle drivers

Posted by puneet sachar <pu...@yahoo.com>.
good morning developers!


tell me if i want to use oracle as my database where
do i keep my drivers in the tomcat and 

2)
where r the oracles drivers 

3) from where i get type 3 or type 4 drivers

4) does oracle 8i personla edition have them...

where is location , so that i copy /paste them to
desired folder


regards
Puneet

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


JSSE vs MOD_SSL

Posted by Johnny <ke...@mimos.my>.
 Hi Tomcat Users,

 I found out the mod_ssl is disabled after I integrated tomcat 4.0.3 with
apache 1.3.20. So I wondering is it possible to run mod_ssl + tomcat +
apache in the same time, instead of using JSSE?

 Regards
 Johnny.





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Detect Cookie Rejection

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 3 Jun 2002, Cavan Morris wrote:

> Date: Mon, 3 Jun 2002 21:42:01 -0700
> From: Cavan Morris <ca...@worldnet.att.net>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Detect Cookie Rejection
>
> Does anyone know of a way to detect when cookies are not accepted by a
> browser.  My site uses session cookies and I'd like to be able to
> redirect people somewhere to tell them that the site requires cookies
> and what to do to activate them...
>
> I'm sure that someone else has already solved this problem.  Any ideas?
>

The only way to know for sure is to set a cookie on a response, and see if
it comes back on the following request.  You have absolutely no clue from
looking just at the current request.  Just as an example, I run Netscape
6, configured to warn me every time about accepting a cookie -- so you
can't even look at the User-Agent header and predict whether *I* am going
to accept your cookie or not.

This is exactly what the servlet container does for you for session IDs,
as long as you use URL rewriting (done with the response.encodeURL()
method) to create all of your hyperlinks.  The container will send the
initial session id both ways (encoded in the URLs, and as a cookie).  If
the session id comes back later as a cookie, the container recognizes this
and stops doing the rewriting -- otherwise it continues.  But the only
safe thing for your application to do is *always* call encodeURL() to
generate all of your hyperlink destinations that should be part of the
same session.

> Cavan Morris
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Detect Cookie Rejection

Posted by Phillip Morelock <su...@phillipmorelock.com>.
in the olden days, the days before tomcat, when servlets were just a twinkle
in Bill Joy's eye, when I walked uphill to school 5 miles in the snow, we
used to:
1. Make a page that uses a meta refresh to another page.  The session needs
to have been created here.
2.  Use the url rewriting mechanism to generate the url for the meta
refresh.  In jsp, it's response.encodeUrl i think.  look that up.
3.  In this page, because it came via url rewriting, you'll still have the
session, so you'll "know" who it is, and then you read the cookies raw from
the request.  See if the session came in.

you may not have to do all that or you might do something else.  I think I
learned this trick at a now-defunct dotcom I worked at during the gold rush,
on ASP with NT4.

cheers
fillup


On 6/3/02 9:42 PM, "Cavan Morris" <ca...@worldnet.att.net> wrote:

> Does anyone know of a way to detect when cookies are not accepted by a
> browser.  My site uses session cookies and I'd like to be able to redirect
> people somewhere to tell them that the site requires cookies and what to do to
> activate them...
> 
> I'm sure that someone else has already solved this problem.  Any ideas?
> 
> Cavan Morris
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Detect Cookie Rejection

Posted by Tom Parker <to...@econz.co.nz>.
> Does anyone know of a way to detect when cookies are not accepted
> by a browser.  My site uses session cookies and I'd like to be
> able to redirect people somewhere to tell them that the site
> requires cookies and what to do to activate them...

If a request comes in with one of your pages as it's referer, but no cookie,
then the browser probably doesn't support cookies, or your cookie expired in
the interval.

Of course, some browsers can be configured to omit the referer header, and I
guess some don't support it at all.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>