-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 28, 2007 10:48 AM
To: Struts Users Mailing List
Subject: Re: Is there any way to avoid session being created


Fogleson, Allen wrote:
> I assume you are using JSP? If so... well no there is not. JSP by 
> default has a contract that a session is always available to it.

> Boy, is that statement false:

> <@page session="false" @>

Uhmmm I said "BY DEFAULT" Unless I am mistaken the default is
"session='true'"

> That seems like an awful waste of effort :(

Not really. We need a session for several reasons... even if they are
not logged in yet, plus we need a "custom" session to handle some stuff
a normal session would not handle easily. (i.e. a user has many
"accounts" the session must keep track of multiple payment pages for the
USER account, but not mess up the payment information for account1 with
account2.... information is stored in the session as "payment")

> This does bring up a good point, though, which is the use of an
> HttpSessionListener to observe "session creation" events. You can
> generate a stack trace when a session is created to find out when and
> where they are being created. As you find places where sessions are
> being created, you can modify your code or your configuration to avoid
> that session creation.

IMHO not really the use for a session listener, but if you wanted to
"debug" your code it is a use. But now you need an extensive regression
suite to hit all your code. Not sure which effort is greater there. :)
Let's face it, in most projects there is NO extensive (read that as
automated, or entirely repeatable) regression suite as it is normally
done by hand. At least in my 20 or so years that is my experience 99% of
the time.

Al

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGg9hB9CaO5/Lv0PARAgG0AJsHWMf0Iv4vs5xZPVCYdgF+sHo3CgCgv1Ij
iuynvwsBxYcJcaqvuhh1P28=
=S8L3
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to