diff gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java @ 991:33198e55371c

Improved session handling in the gui. If a session has timed out, the user gets to the start point - the fis selection. gnv/trunk@1192 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 10 Jun 2010 15:13:08 +0000
parents 13de46229f63
children 9ff116474e7b
line wrap: on
line diff
--- a/gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java	Thu Jun 10 09:54:58 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/DescribeUIAction.java	Thu Jun 10 15:13:08 2010 +0000
@@ -5,6 +5,7 @@
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 import javax.xml.xpath.XPathConstants;
 
 import org.apache.log4j.Logger;
@@ -66,6 +67,15 @@
         HttpServletResponse response
     ) throws Exception
     {
+        HttpSession session = request.getSession();
+        // TODO REMOVE THIS: FOR TESTING
+        session.setMaxInactiveInterval(15);
+
+        if (isSessionExhausted(request)) {
+            // session timed out before
+            return sessionExhaustedForward(mapping, form, request, response);
+        }
+
         logger.info("describe user interface");
         try {
             // render describe document and create user interface

http://dive4elements.wald.intevation.org