You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Haroon Rafique <ha...@utoronto.ca> on 2007/08/08 22:16:29 UTC
struts 2.0.9 disable automatic session creation
Hi there,
I am looking for ways to prevent automatic session creation on certain
"monitoring" pages of my site. The rest of the application will indeed
have regular session support.
Any one has any recipes they want to share? I'm using struts 2.0.9 with
sitemesh decorators and freemarker as the view.
I remember with struts 1, it wasn't exactly easy. There was a checklist
that had to be followed. Something like:
1. Make sure <controller> element has locale="false"
2. Use <%@ page session="false" %> in JSPs
3. etc...
Thanks in advance,
--
Haroon Rafique
<ha...@utoronto.ca>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2.0.9 disable automatic session creation
Posted by Haroon Rafique <ha...@utoronto.ca>.
On Today at 4:16pm, HR=>Haroon Rafique <ha...@utoronto.ca> wrote:
HR> [..snip..]
HR>
HR> Any one has any recipes they want to share? I'm using struts 2.0.9
HR> with sitemesh decorators and freemarker as the view.
HR>
Since I use sitemesh, I think I know the culprit is sitemesh. I found the
following at the bottom of:
http://cwiki.apache.org/WW/performance-tuning.html
Do not create sessions unless you need them.
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 (See
http://forums.opensymphony.com/thread.jspa?messageID=5688 for details).
Later,
--
Haroon Rafique <ha...@utoronto.ca>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org