You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Raghaw Goswami <ra...@yahoo.com> on 2005/08/19 15:46:10 UTC
Session Tracking
Hi,
I have JDK 1.5 [J2SE 5.0 update 3], Tomcat 5.5.9,Win
XP SP2, Trying a e.g. session tracking [The Session
Tracking API] using HttpSession object.
The program works[ accessCount increments] when I
don't close the current browser and open new brwoser
with CTRL + N, But if i quit the browser and then
start again
accessCount does not increment.
Would appreciate any help in this regards
Thanks in Advance
R.
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session Tracking
Posted by Brian Cook <bc...@printtime.com>.
Of corse it doesn't. If you close the browser you are killing the
session. So when the browser reopens it is getting a new session
object. This is exactly how it is supposed to work. You might be be
able to store the value in a cookie, but if the user blocks them or has
set their browser to delete cookies at the end of the session as most do
then that will not work either.
Raghaw Goswami wrote:
> Hi,
> I have JDK 1.5 [J2SE 5.0 update 3], Tomcat 5.5.9,Win
> XP SP2, Trying a e.g. session tracking [The Session
> Tracking API] using HttpSession object.
>
> The program works[ accessCount increments] when I
> don't close the current browser and open new brwoser
> with CTRL + N, But if i quit the browser and then
> start again
> accessCount does not increment.
>
> Would appreciate any help in this regards
>
> Thanks in Advance
> R.
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
--
Brian Cook
Digital Services Analyst
Print Time Inc.
bcook@printtime.com
913.345.8900
Re: Session Tracking
Posted by Raghaw Goswami <ra...@yahoo.com>.
Thanks for e-mail's.
I am new to these technologies & learning on my own, I
will read on java language and session mgmt.
Thanks again.
R.
--- Brian Cook <bc...@printtime.com> wrote:
>
> As well as the rules for session management.
>
> Wade Chandler wrote:
> > I think you need to read up on the java language a
> > bit. See what static and final mean.
> >
> > Wade
> >
> > --- Raghaw Goswami <ra...@yahoo.com> wrote:
> >
> >
> >>Thanks for the e-mail:
> >>First time it was 0 , then 1 , This is when the
> >>browser was closed and opened then it never
> >>incremented was always 0 when browser was closed
> and
> >>opened.
> >>
> >>I am attaching the Showsession.java file for
> >>reference. May be i am missing some thing if the
> >>variable is made static how can its value
> increment
> >>?
> >>
> >>R
> >>
> >>--- Arup Vidyerthy <li...@yahoo.co.uk>
> wrote:
> >>
> >>
> >>>Does it not increment at all or does the
> increment
> >>>counter gets reset and
> >>>starts all over again from 0. Basically if you
> >>
> >>want
> >>
> >>>to keep the counter
> >>>incrementing everytime you access that page (or
> >>
> >>hit
> >>
> >>>that that servlet) you
> >>>need to make it a static variable in your
> >>>servlet/jsp.
> >>>
> >>>-----Original Message-----
> >>>From: Raghaw Goswami [mailto:raghaw@yahoo.com]
> >>>Sent: 19 August 2005 14:46
> >>>To: tomcat-user@jakarta.apache.org
> >>>Subject: Session Tracking
> >>>
> >>>Hi,
> >>>I have JDK 1.5 [J2SE 5.0 update 3], Tomcat
> >>
> >>5.5.9,Win
> >>
> >>>XP SP2, Trying a e.g.
> >>>session tracking [The Session Tracking API] using
> >>>HttpSession object.
> >>>
> >>>The program works[ accessCount increments] when I
> >>>don't close the current
> >>>browser and open new brwoser with CTRL + N, But
> if
> >>
> >>i
> >>
> >>>quit the browser and
> >>>then start again accessCount does not increment.
> >>>
> >>>Would appreciate any help in this regards
> >>>
> >>>Thanks in Advance
> >>>R.
> >>>
> >>>
> >>>
> >>>
> >>>__________________________________
> >>>Do you Yahoo!?
> >>>Yahoo! Mail - You care about security. So do we.
> >>>http://promotions.yahoo.com/new_mail
> >>>
> >>>
> >>
> >
>
---------------------------------------------------------------------
> >
> >>>To unsubscribe, e-mail:
> >>>tomcat-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail:
> >>>tomcat-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
>
___________________________________________________________
> >
> >>>Yahoo! Messenger - NEW crystal clear PC to PC
> >>>calling worldwide with voicemail
> >>>http://uk.messenger.yahoo.com
> >>>
> >>>
> >>
> >
>
---------------------------------------------------------------------
> >
> >>>To unsubscribe, e-mail:
> >>>tomcat-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail:
> >>>tomcat-user-help@jakarta.apache.org
> >>>
> >>>
> >>
> >>__________________________________________________
> >>Do You Yahoo!?
> >>Tired of spam? Yahoo! Mail has the best spam
> >>protection around
> >>http://mail.yahoo.com
> >>
> >
>
---------------------------------------------------------------------
> >
> >>To unsubscribe, e-mail:
> >>tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail:
> >
> > tomcat-user-help@jakarta.apache.org
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Brian Cook
> Digital Services Analyst
> Print Time Inc.
> bcook@printtime.com
> 913.345.8900
>
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session Tracking
Posted by Brian Cook <bc...@printtime.com>.
As well as the rules for session management.
Wade Chandler wrote:
> I think you need to read up on the java language a
> bit. See what static and final mean.
>
> Wade
>
> --- Raghaw Goswami <ra...@yahoo.com> wrote:
>
>
>>Thanks for the e-mail:
>>First time it was 0 , then 1 , This is when the
>>browser was closed and opened then it never
>>incremented was always 0 when browser was closed and
>>opened.
>>
>>I am attaching the Showsession.java file for
>>reference. May be i am missing some thing if the
>>variable is made static how can its value increment
>>?
>>
>>R
>>
>>--- Arup Vidyerthy <li...@yahoo.co.uk> wrote:
>>
>>
>>>Does it not increment at all or does the increment
>>>counter gets reset and
>>>starts all over again from 0. Basically if you
>>
>>want
>>
>>>to keep the counter
>>>incrementing everytime you access that page (or
>>
>>hit
>>
>>>that that servlet) you
>>>need to make it a static variable in your
>>>servlet/jsp.
>>>
>>>-----Original Message-----
>>>From: Raghaw Goswami [mailto:raghaw@yahoo.com]
>>>Sent: 19 August 2005 14:46
>>>To: tomcat-user@jakarta.apache.org
>>>Subject: Session Tracking
>>>
>>>Hi,
>>>I have JDK 1.5 [J2SE 5.0 update 3], Tomcat
>>
>>5.5.9,Win
>>
>>>XP SP2, Trying a e.g.
>>>session tracking [The Session Tracking API] using
>>>HttpSession object.
>>>
>>>The program works[ accessCount increments] when I
>>>don't close the current
>>>browser and open new brwoser with CTRL + N, But if
>>
>>i
>>
>>>quit the browser and
>>>then start again accessCount does not increment.
>>>
>>>Would appreciate any help in this regards
>>>
>>>Thanks in Advance
>>>R.
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Mail - You care about security. So do we.
>>>http://promotions.yahoo.com/new_mail
>>>
>>>
>>
> ---------------------------------------------------------------------
>
>>>To unsubscribe, e-mail:
>>>tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail:
>>>tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>
> ___________________________________________________________
>
>>>Yahoo! Messenger - NEW crystal clear PC to PC
>>>calling worldwide with voicemail
>>>http://uk.messenger.yahoo.com
>>>
>>>
>>
> ---------------------------------------------------------------------
>
>>>To unsubscribe, e-mail:
>>>tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail:
>>>tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Tired of spam? Yahoo! Mail has the best spam
>>protection around
>>http://mail.yahoo.com
>>
> ---------------------------------------------------------------------
>
>>To unsubscribe, e-mail:
>>tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>
> tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
--
Brian Cook
Digital Services Analyst
Print Time Inc.
bcook@printtime.com
913.345.8900
RE: Session Tracking
Posted by Wade Chandler <hw...@yahoo.com>.
I think you need to read up on the java language a
bit. See what static and final mean.
Wade
--- Raghaw Goswami <ra...@yahoo.com> wrote:
> Thanks for the e-mail:
> First time it was 0 , then 1 , This is when the
> browser was closed and opened then it never
> incremented was always 0 when browser was closed and
> opened.
>
> I am attaching the Showsession.java file for
> reference. May be i am missing some thing if the
> variable is made static how can its value increment
> ?
>
> R
>
> --- Arup Vidyerthy <li...@yahoo.co.uk> wrote:
>
> > Does it not increment at all or does the increment
> > counter gets reset and
> > starts all over again from 0. Basically if you
> want
> > to keep the counter
> > incrementing everytime you access that page (or
> hit
> > that that servlet) you
> > need to make it a static variable in your
> > servlet/jsp.
> >
> > -----Original Message-----
> > From: Raghaw Goswami [mailto:raghaw@yahoo.com]
> > Sent: 19 August 2005 14:46
> > To: tomcat-user@jakarta.apache.org
> > Subject: Session Tracking
> >
> > Hi,
> > I have JDK 1.5 [J2SE 5.0 update 3], Tomcat
> 5.5.9,Win
> > XP SP2, Trying a e.g.
> > session tracking [The Session Tracking API] using
> > HttpSession object.
> >
> > The program works[ accessCount increments] when I
> > don't close the current
> > browser and open new brwoser with CTRL + N, But if
> i
> > quit the browser and
> > then start again accessCount does not increment.
> >
> > Would appreciate any help in this regards
> >
> > Thanks in Advance
> > R.
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - You care about security. So do we.
> > http://promotions.yahoo.com/new_mail
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> >
>
___________________________________________________________
> >
> > Yahoo! Messenger - NEW crystal clear PC to PC
> > calling worldwide with voicemail
> > http://uk.messenger.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Session Tracking
Posted by Raghaw Goswami <ra...@yahoo.com>.
Thanks for the e-mail:
First time it was 0 , then 1 , This is when the
browser was closed and opened then it never
incremented was always 0 when browser was closed and
opened.
I am attaching the Showsession.java file for
reference. May be i am missing some thing if the
variable is made static how can its value increment ?
R
--- Arup Vidyerthy <li...@yahoo.co.uk> wrote:
> Does it not increment at all or does the increment
> counter gets reset and
> starts all over again from 0. Basically if you want
> to keep the counter
> incrementing everytime you access that page (or hit
> that that servlet) you
> need to make it a static variable in your
> servlet/jsp.
>
> -----Original Message-----
> From: Raghaw Goswami [mailto:raghaw@yahoo.com]
> Sent: 19 August 2005 14:46
> To: tomcat-user@jakarta.apache.org
> Subject: Session Tracking
>
> Hi,
> I have JDK 1.5 [J2SE 5.0 update 3], Tomcat 5.5.9,Win
> XP SP2, Trying a e.g.
> session tracking [The Session Tracking API] using
> HttpSession object.
>
> The program works[ accessCount increments] when I
> don't close the current
> browser and open new brwoser with CTRL + N, But if i
> quit the browser and
> then start again accessCount does not increment.
>
> Would appreciate any help in this regards
>
> Thanks in Advance
> R.
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
>
>
>
>
>
>
___________________________________________________________
>
> Yahoo! Messenger - NEW crystal clear PC to PC
> calling worldwide with voicemail
> http://uk.messenger.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
RE: Session Tracking
Posted by Arup Vidyerthy <li...@yahoo.co.uk>.
Does it not increment at all or does the increment counter gets reset and
starts all over again from 0. Basically if you want to keep the counter
incrementing everytime you access that page (or hit that that servlet) you
need to make it a static variable in your servlet/jsp.
-----Original Message-----
From: Raghaw Goswami [mailto:raghaw@yahoo.com]
Sent: 19 August 2005 14:46
To: tomcat-user@jakarta.apache.org
Subject: Session Tracking
Hi,
I have JDK 1.5 [J2SE 5.0 update 3], Tomcat 5.5.9,Win XP SP2, Trying a e.g.
session tracking [The Session Tracking API] using HttpSession object.
The program works[ accessCount increments] when I don't close the current
browser and open new brwoser with CTRL + N, But if i quit the browser and
then start again accessCount does not increment.
Would appreciate any help in this regards
Thanks in Advance
R.
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org