SessionListener with GWT

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

SessionListener with GWT

Postby mukund » Sat May 31, 2008 10:18 am

We are using GWT Designer to build our Web application.

I would like to implement Session Listener to log the logins and logouts. Would like to do some housekeeping upon logout.

How do I register the class implementing SessionListener in GWT. How do I modify the WEB.xml so that it works both in Hosted mode and as well as when I deploy the war file.

Can you provide some instructions/help.

Thanks,
GWT Fan
mukund
 
Posts: 2
Joined: Sat May 31, 2008 10:13 am

Re: SessionListener with GWT

Postby Eric Clayberg » Sun Jun 01, 2008 7:21 am

mukund wrote:How do I register the class implementing SessionListener in GWT. How do I modify the WEB.xml so that it works both in Hosted mode and as well as when I deploy the war file.

No idea. That would be a good question for Google's GWT forum.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: SessionListener with GWT

Postby mukund » Tue Jun 03, 2008 9:43 pm

Thanks for your reply.

I'm able to get the Session Listener class fire from the server side code. I need to edit the web.xml to include my SessionListener.

I had to hand edit the web.xml in WEBINF folder to include :
Code: Select all
   
    <listener>
                <listener-class>com.ses.tims.server.LoginServiceImpl</listener-class>
    </listener>


My question now is, when I use GWTDesigner to deploy my war file, how can I setup the entry in xxx.gwt.xml (or anywhere else) so that the above web.xml entry get created automatically.

We would like to the war file to be deployed in multiple environment and would like to avoid hand editing web.xml in every deployment.
mukund
 
Posts: 2
Joined: Sat May 31, 2008 10:13 am

Re: SessionListener with GWT

Postby Eric Clayberg » Wed Jun 04, 2008 7:26 pm

You could create a web project and completely control the web.xml file yourself.

Alternatively, you could modify the generated build.xml file to add additional info to the web.xml file when it is created.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests