You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave <ja...@yahoo.com> on 2007/03/15 07:49:52 UTC

open a window in a new session

I am using servlet.  How to open a window in a new session?
   
  I tried javascript
   
  onclick="window.open(...)"
   
  but the opened window belongs to the same servlet session (see from user login name).
   
  Thanks for help!
  David
   
   
   

 
---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.

Re: open a window in a new session

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

Dave wrote:
> Hi Chris, Thanks for your reply.
> 
> How to configure server(Tomcat, I am using JBoss) to use URL-encoded
> session id tracking?  I did not do anything. Is cookie used for
> session tracking by default?

IIRC, Tomcat uses cookies if they are available. You can turn then off
entirely:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

Look under the "common attributes" section for instructions.

- -chris

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

iD8DBQFF+WJO9CaO5/Lv0PARAgLhAJsHxDNakaIidWX/rZkN7dZK1hnt+wCfX3Pz
5Fcd3KhgOpsRMtP044B+SiI=
=UueA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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


Re: open a window in a new session

Posted by Dave <ja...@yahoo.com>.
Hi Chris,
  Thanks for your reply.
   
  How to configure server(Tomcat, I am using JBoss) to use URL-encoded session id tracking?  I did not do anything. Is cookie used for session tracking by default?
   
  Thanks!
  David

Christopher Schultz <ch...@christopherschultz.net> wrote:
  -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

Dave wrote:
> I am using servlet. How to open a window in a new session?
> 
> I tried javascript
> 
> onclick="window.open(...)"
> 
> but the opened window belongs to the same servlet session (see from
> user login name).

If you are using cookie-based session id tracking, you might not be able
to do this at all.

If you switch to URL-encoded session id tracking, you can simply leave
the session id out of the popup's URL and your popup will not inherit
the current session from the old one.

- -chris

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

iD8DBQFF+UX89CaO5/Lv0PARAkSIAKCb4gWA+EPb/D6FU/iPKz9rvknUywCfa6mU
OlpwtfMF+5EA6ICgWorRP04=
=rGp+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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



 
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

Re: open a window in a new session

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

Dave wrote:
> If I open an IE from windows desktop, and then access the link, it
> will start a new session. Is there any control on cookie, like do not
> use cookie for this new window?

By default, I believe that Tomcat creates browser-session cookies, which
are only used until the browser is closed (i.e. they are only stored in
memory, or at least, you can think about it that way).

When you open up a new browser from "the desktop", you might be starting
a new process which is separate from the existing one. I don't believe
that you can convince a browser to open up a new copy of itself in a
separate process, so this observation isn't really going to help you, here.

- -chris

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

iD8DBQFF+WLw9CaO5/Lv0PARAtDyAKCbM7BtgCZYGbTZqIo2x6wNF8VTRQCfZImt
jkV35m5JkJIIYv5WkoBDREg=
=N/by
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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


Re: open a window in a new session

Posted by Dave <ja...@yahoo.com>.
If I open an IE from windows desktop, and then access the link, it will start a new session. Is there any control on cookie, like do not use cookie for this new window?
Thanks!
Christopher Schultz <ch...@christopherschultz.net> wrote:  -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

Dave wrote:
> I am using servlet. How to open a window in a new session?
> 
> I tried javascript
> 
> onclick="window.open(...)"
> 
> but the opened window belongs to the same servlet session (see from
> user login name).

If you are using cookie-based session id tracking, you might not be able
to do this at all.

If you switch to URL-encoded session id tracking, you can simply leave
the session id out of the popup's URL and your popup will not inherit
the current session from the old one.

- -chris

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

iD8DBQFF+UX89CaO5/Lv0PARAkSIAKCb4gWA+EPb/D6FU/iPKz9rvknUywCfa6mU
OlpwtfMF+5EA6ICgWorRP04=
=rGp+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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



 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

Re: open a window in a new session

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

Dave wrote:
> I am using servlet.  How to open a window in a new session?
> 
> I tried javascript
> 
> onclick="window.open(...)"
> 
> but the opened window belongs to the same servlet session (see from
> user login name).

If you are using cookie-based session id tracking, you might not be able
to do this at all.

If you switch to URL-encoded session id tracking, you can simply leave
the session id out of the popup's URL and your popup will not inherit
the current session from the old one.

- -chris

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

iD8DBQFF+UX89CaO5/Lv0PARAkSIAKCb4gWA+EPb/D6FU/iPKz9rvknUywCfa6mU
OlpwtfMF+5EA6ICgWorRP04=
=rGp+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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