tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bachler, Elisabeth \(Elisabeth\)" <ebach...@alcatel-lucent.com>
Subject RE: I would like a new session each time I start my application
Date Mon, 04 Jun 2007 14:43:03 GMT
Thank you so much!
 

-----Original Message-----
From: kempo bob [mailto:bsmith@practical-technology.net] 
Sent: lunes, 04 de junio de 2007 16:40
To: users@tomcat.apache.org
Subject: RE: I would like a new session each time I start my application


Elisabeth,

1) To see what the context tag looks like, see the server-example.xml file that ships with
the Tomcat distribution. You're probably running under a minimal configuration that lets most
items default.
2) That being said, I don't think its going to fix your problem to turn off session persistence.
Even if you turn persistence off, you're not going to get a new session every time a user
goes to index.html. Once a session is created, it remains in effect until it expires as a
result of a configured inactivity-timeout or as a result of being deliberately invalidated
by servlet code. You could use HttpSession.invalidate() to force it to expire, but I agree
with Johnny and David - this really doesn't sound like a good way to accomplish the goal.
I'd use one of the methods they described.

Bobby


celia05es wrote:
> 
> Hi,
> Thanks for your quick answer.... When I say "each time I run my 
> application", I mean each time I start my application.
> Let's say my application is : $TOMCAT_HOME/webapps/my_app/index.html
> Each time I execute: $TOMCAT_HOME/webapps/my_app/index.html, I would 
> like a new sessionID to be generated.
> You tell me to disable the session persistence in my app's context.... 
> I suppose you mean the conf/server.xml, the conf/context.xml file?
> I had a look at the server.xml file .... And I have no Context tag?
> The context.xml file does not have a docBase mentioned in the context tag.
> 
> What should I put in the docBase variable?
> docBase="$TOMCAT_HOME/webapps/my_app?
> 
> Thanks
> Elisabeth
> 
> 
> -----Original Message-----
> From: Rashmi Rubdi [mailto:rashmi.sub@gmail.com]
> Sent: sábado, 02 de junio de 2007 15:53
> To: Tomcat Users List
> Subject: Re: I would like a new session each time I start my 
> application
> 
> On 6/1/07, Bachler, Elisabeth (Elisabeth) 
> <ebachler@alcatel-lucent.com>
> wrote:
>> Hi,
>> I have an application that works under tomcat.
>> Each time I run my application I have the same sessionID. Is there a 
>> way
> 
> I guess you mean each time you (re)start Tomcat when you say "Each 
> time I run my application..."
> 
> You might be seeing the same sessionID because the session persistence.
> 
>> to generate a differente sessionID each time I start my application?
> 
> Try disabling the session persistence in your app's Context.
> 
> <Context docBase="......." >
> 
> <Manager className="org.apache.catalina.session.PersistentManager"
> saveOnRestart="false"/>
> 
> </Context>
> 
> 
>> Thanks
> 
> I don't know if the above will work in all versions of Tomcat, but it 
> should work on Tomcat 5.5.x or higher. Next time please mention the 
> version of Tomcat and other relevant details.
> 
> -Rashmi
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

--
View this message in context: http://www.nabble.com/I-would-like-a-new-session-each-time-I-start-my-application-tf3853422.html#a10951048
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message