0

I need session out a application when the user doesn't use the application for the certain time interval.for that I configure session time out in web.xml.but its not working.

<session-config>
    <session-timeout>1</session-timeout>
</session-config>

Kindly help me

shyam
  • 9,134
  • 4
  • 29
  • 44
kader
  • 21
  • 5

3 Answers3

1

GWT gets compiled to javascript and runs on the browser so, the session timeout will have to be handled when you are making a GWT-RPC call using a servlet filter

shyam
  • 9,134
  • 4
  • 29
  • 44
  • Actually what is my requirment is,i need to sesssion out when user not use the application like not touch the application. then i have to relocate to loginpage that is a HTML page.what i'm done here is...i create one GWT client side application and paste the compiled folder in android project asset folder.i call GWT application through web view. – kader May 03 '13 at 13:38
0

When you mentioned timeout in web.xml and try to access after the timeout

Exception type RequestTimeoutException throws by contianer

Thrown to indicate that an HTTP request has timed out.

dont forget to add

<module>
  <!-- other inherited modules, such as com.google.gwt.user.User -->
  <inherits name="com.google.gwt.http.HTTP"/>
  <!-- additional module settings -->
</module>

See this to handle that on client side How to handle a session timeout exception (with MVP Places and Activities)?

Community
  • 1
  • 1
Suresh Atta
  • 120,458
  • 37
  • 198
  • 307
0

you have to do some mechanism to achieve it.

i need to sesssion out when user not use the application like not touch the application.

As you know if you are not working on some page so there is no any mouse movement. so you can do something with that.

I have same requirement I have done like this refer Mouse movement for session timeout in GWT

i create one GWT client side application and paste the compiled folder in android project asset folder.i call GWT application through web view.

I didn't check this with webview. it should work!!

Community
  • 1
  • 1
bNd
  • 7,512
  • 7
  • 39
  • 72
  • now i am try to implement what you posted here Mouse movement for session timeout in GWT.how to use session factory in GWT client side.on that page,he mention write a code on onmodule method.but sessionfactory is not import in client side GWT.how it is possible – kader May 09 '13 at 12:21
  • SessionFactory is nothing but one custom map which has one key like SesisonKey.CLIENT_SESSION_EXPIRED. Instead of it, you can use any boolean variable. – bNd May 09 '13 at 12:57