diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-04-15 21:32:28 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-04-15 21:32:28 +1200 |
commit | 6439ce3fa3a58150b88f074c5498627b7e14f79a (patch) | |
tree | 2a2845c8ce056e37a31eb02462a3c60caed730ad | |
parent | cce90872fe9bbdfaa26e90cd0f9dbc97a74bf495 (diff) | |
download | trackermap-web-6439ce3fa3a58150b88f074c5498627b7e14f79a.tar.gz trackermap-web-6439ce3fa3a58150b88f074c5498627b7e14f79a.tar.bz2 trackermap-web-6439ce3fa3a58150b88f074c5498627b7e14f79a.zip |
Increase session timeout
-rw-r--r-- | src/org/traccar/web/server/model/DataServiceImpl.java | 6 | ||||
-rw-r--r-- | war/WEB-INF/web.xml | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index eb466694..c2ebce15 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -108,7 +108,11 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService private User getSessionUser() { HttpSession session = getThreadLocalRequest().getSession(); - return (User) session.getAttribute(ATTRIBUTE_USER); + User user = (User) session.getAttribute(ATTRIBUTE_USER); + if (user == null) { + throw new IllegalStateException(); + } + return user; } @Override diff --git a/war/WEB-INF/web.xml b/war/WEB-INF/web.xml index 387c1efe..5cd9b715 100644 --- a/war/WEB-INF/web.xml +++ b/war/WEB-INF/web.xml @@ -18,5 +18,9 @@ <welcome-file-list> <welcome-file>traccar.html</welcome-file> </welcome-file-list> + + <session-config> + <session-timeout>0</session-timeout> + </session-config> </web-app> |