struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Need to disable session interceptor
Date Tue, 01 Sep 2009 15:41:05 GMT

 JSP create sessions by default. It is servlets that don't create a session unless you 
call getSession(). Do you have something like

<%@ page session="false">

at the top of your JSPs?





-----Original Message-----
From: Rajeev Sharma <>
To: Struts Users Mailing List <>
Sent: Tue, Sep 1, 2009 9:49 am
Subject: RE: Need to disable session interceptor

I googled this and the struts2 performance tuning page says this "Struts
2 does not create sessions unless asked to (for example, by having the
createSession interceptor in your interceptor stack). Note that when you
use SiteMesh however, a session will always be created"

I am never creating the session in my code directly and AFAIK I am not
using SiteMesh (I don't even know what exactly is this). I have written
code using JSP/Servlet and my knowledge says that unless the session is
created explicitly it wont be created. Is there any interceptor in the
defaultStack which creates it? (is the createSession part or
defaultStack?) or I am doing something wrong.

I opened some pages on my application and found there was one session
created for my browser and others for other clients, So I guess this has
nothing to do with JMeter. Sessions are being created for every client.
I am trying to find out why is the session created when I did not create
the session in my code.


-----Original Message-----
From: Martin Gainty <>
Reply-to: "
Struts Users Mailing List" <>
To: Struts Users Mailing List <>
Subject: RE: Need to disable session interceptor
Date: Tue, 1 Sep 2009 09:23:58 -0400


doc suggests implementing a HttpCookieManager to handle the session
any suggestions on which HttpCookieManager to implement and possible 

(i think JMeter is O/T so please ping offline)

Martin Gainty 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

> Date: Tue, 1 Sep 2009 13:19:22 +0200
> Subject: Re: Need to disable session interceptor
> From:
> To:
> From the JMeter FAQ: "How do I ensure each http request for jsp is
> within one jsessionid ?"
> Nils-H
> On Tue, Sep 1, 2009 at 1:15 PM, Dave Newton<> wrote:
> > Rajeev Sharma wrote:
> >>
> >> I am new to struts
2 (I mean struts). I am developing an application which
> >> does not need to use sessions at all. When I tested my application with
> >> jmeter, I got 18000 sessions created (tomcat showed me this). Looks like 
> >> every individual request there is one session created. How can I remove the
> >> session interceptor at all (and other components related to sessions), so
> >> that there are no sessions created in my application.
> >
> > There isn't a session created for each request, there's a session per client
> > conversation. Also, AFAIK, Struts 2 doesn't do anything in particular
> > regarding session creation--that is handled by the container.
> >
> > Dave
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Get back to school stuff for them and cashback for you.

To unsubscribe, e-mail:
For additional commands, e-mail:


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message