summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-08-28 13:33:12 +0000
committerArtur Signell <artur.signell@itmill.com>2009-08-28 13:33:12 +0000
commit5e83485e9bb1df9e2214a936b7b10fe3e0ca5dfc (patch)
treec637b70895200ca5bb625a752d888455660812bd /src/com
parentfa902ac657d6f516c5a870b261202d88ebfdfa41 (diff)
downloadvaadin-framework-5e83485e9bb1df9e2214a936b7b10fe3e0ca5dfc.tar.gz
vaadin-framework-5e83485e9bb1df9e2214a936b7b10fe3e0ca5dfc.zip
Fix for #3167 - IllegalStateExcepton when session expires
svn changeset:8578/svn branch:6.1
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index a9e30bdb67..0e1566ad0e 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -913,17 +913,22 @@ public abstract class AbstractApplicationServlet extends HttpServlet {
// just go ahead redirect the browser
response.sendRedirect(ci.getSessionExpiredURL());
} else {
- // send uidl redirect
- criticalNotification(request, response, ci
- .getSessionExpiredCaption(), ci
- .getSessionExpiredMessage(), null, ci
- .getSessionExpiredURL());
/*
* Invalidate session (weird to have session if we're saying
* that it's expired, and worse: portal integration will fail
* since the session is not created by the portal.
+ *
+ * Session must be invalidated before criticalNotification as it
+ * commits the response.
*/
request.getSession().invalidate();
+
+ // send uidl redirect
+ criticalNotification(request, response, ci
+ .getSessionExpiredCaption(), ci
+ .getSessionExpiredMessage(), null, ci
+ .getSessionExpiredURL());
+
}
} catch (SystemMessageException ee) {
throw new ServletException(ee);