Wednesday, June 26, 2013

Re: Session Listener

Ok, it works! Thanks!

My mistake was to think that the sessionCreated event was created when the application started. Shame on me! The sessionCreated  is called instead the first time the application interacts with the server. Another wrong assumption by me was that I thought the sessionDestroyed was called when the user closes the web page or navigate to another web site. Wrong! The sessionDestroyed is called after some time of non interaction between the client and the server, no matter if the web page is still open or has been closed. Another time shame on me! I just decided to describe that here to share my discovery.

Cheers.

On Friday, June 21, 2013 11:35:58 PM UTC+2, Valavanur Man wrote:
We resolved the issue by added session listener to web.xml under Web-inf, as described above. We created the build.xml from GWT and referred to the web.xml.
<target name="war" depends="javac, gwtc, libs">
<delete file="${war.name}" />
      <war basedir="war" destfile="${war.name}" webxml="war/WEB-INF/web.xml"  />
      <jar destfile="${war.name}" basedir="war" duplicate="preserve" />
<!-- clean up -->
<delete dir="@dot" />
</target>


We use ant to build the war file outside eclipse to build the project.

Hope this helps.

Thanks,
GWTFan

On Friday, June 21, 2013 12:40:21 AM UTC-7, Magallo wrote:
Hi Valavanur, I know your question is a little outdated, but I have the same necessity and I don't knbow how to do. I mean, I tried in my GWT Explise project, to add a Session Listener as explained by loladi but it seems it doesn't work. Obviously I alse added the <listerner> section in my web.xml file, but it seems my listener is just ignored and does not execute the code. I tried adding some brerakpoints in the sessionCreated and sessionDestroyed methods, but simply the execution never stops at these points. What am I missing?

Thanks.

On Monday, June 2, 2008 1:16:11 AM UTC+2, Valavanur Man wrote:
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

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment