-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jerry,
On 2/9/13 12:04 AM, Jerry Malcolm wrote: > I need to set and read a session attribute across multiple webapps. > I have googled this and have read many answers. The general > consensus is that setting crossContext="true" and/or setting > singleSignOn="true" and/or adding emptySessionPath="true" all > should make it work. None of those will work. > I have done all of that, but it doesn't seem to make any > difference. I still can't, in one app, see the session attribute > that is set in another app. This is actually required by the servlet specification which mandates that each webapp have a separate HttpSession. So, single-sign-on just makes it so you don't have to re-authenticate with the same server to get into a different webap, but you still have distinct sessions. crossContext and emptySessionPath just confuse things, here. > Am I missing something obvious here? Posts all over the web have > said it works for them. (??) They must be confused. > First question... 'should' I be able to see a session attribute > across sessions if I have the above config variables set > correctly? Nope. > If this is never intended to ever work, what are alternatives? Any tech that will allow you to share (private?) data will work: RDBMS, memcached, flat file, Amazon S3, etc. > Somebody suggested getContext( "aaa" ).setAttribute(....). But if > I set a context variable, the data value going to be common to all > sessions in that context and not per user, correct? Correct. > Others have recommended setting up a database table and/or disk > files to write the data, etc. It seems that is way overkill to > have to go that massive amount of work and performance overhead to > keep track of a temporary session variable simply because I > structured and modularized my program into a couple of different > webapps. That sounds about right. Unfortunately, you have the servlet spec working against you, here. > I'm running TC 7.0.23 Upgrade. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEWUUcACgkQ9CaO5/Lv0PA8ZwCgjlMTw+p9f3i3YVOKaSaaukof 3GUAnRVzWT0cwggMNKNY8OJ6urBJX5uv =sRoP -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org