Project

General

Profile

Impossible to have Multiple sessions in the same browser

Added by Thim Anneessens over 13 years ago

Hello,

I cannot seem to have multiple concurrent sessions of the same application running in the same browser. For instance when having multiple tabs in Firefox.

I find that strange because the JWt website does not seem to have the same limitations. Is this a known issue? Is there a work arround or is it a feature?

Here is the configuration and a simple code exemple:

Configuration:

- Server: Glassfish 3 on Windows or Linux

  • Client: Windows - Firefox - Opera (latets versions)

Code:

public class Application extends WApplication{
public Application(WEnvironment env) {
super(env);
new WText("Test",getRoot());
WStackedWidget stack=new WStackedWidget(getRoot());
WMenu menu=new WMenu(stack,Orientation.Horizontal,getRoot());

menu.addItem("First", new WText("How are you doing"));
        menu.addItem("Second", new WText("Fine and you"));
        menu.addItem("Third", new WText("Fine too"));
        menu.addItem("Fourth", new WText("Good"));
    }     
}

Console output after launching first tab:

GRAVE: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

GRAVE:

Console output after launching a second tab:

GRAVE: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

GRAVE:

GRAVE: Session exiting:bc1b49ae19fb408b75369c7264ba

GRAVE: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

GRAVE:

GRAVE: Session exiting:bd9711011a78ee39818054d8c1d7

GRAVE: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

GRAVE:

Best regards,

Thim.


Replies (2)

RE: Impossible to have Multiple sessions in the same browser - Added by Thim Anneessens over 13 years ago

Reply from Pieter Libin

Dear Thim,

you should disable cookies for session tracking,

our examples do this for both jbossm, tomcat and a version of jetty (see the context.xml and jetty-web.xml files in WebRoot).

Please check the glassfish documentation on how to do this.

greetings,

Pieter

RE: Impossible to have Multiple sessions in the same browser - Added by Thim Anneessens over 13 years ago

From Thim

Super, fixed.

In Glassfish you simply have to modify your WEB-INF/sun-web.xml.



...

*



*

...

I will copy this thread on the forum.

Thanks,

Thim.

    (1-2/2)