diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/http/DeviceServlet.java | 6 | ||||
-rw-r--r-- | src/org/traccar/http/MainServlet.java | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/org/traccar/http/DeviceServlet.java b/src/org/traccar/http/DeviceServlet.java index c994ed266..260083e0e 100644 --- a/src/org/traccar/http/DeviceServlet.java +++ b/src/org/traccar/http/DeviceServlet.java @@ -26,10 +26,6 @@ import javax.servlet.http.HttpServletResponse; import org.traccar.Context; public class DeviceServlet extends HttpServlet { - - private static final long ASYNC_TIMEOUT = 120000; - - private static final String USER_ID = "userId"; @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { @@ -53,7 +49,7 @@ public class DeviceServlet extends HttpServlet { private void get(HttpServletRequest req, HttpServletResponse resp) throws IOException { - long userId = (Long) req.getSession().getAttribute(USER_ID); + long userId = (Long) req.getSession().getAttribute(MainServlet.USER_ID); JsonObjectBuilder result = Json.createObjectBuilder(); diff --git a/src/org/traccar/http/MainServlet.java b/src/org/traccar/http/MainServlet.java index 87769b780..62345489e 100644 --- a/src/org/traccar/http/MainServlet.java +++ b/src/org/traccar/http/MainServlet.java @@ -40,9 +40,9 @@ import org.traccar.model.Position; public class MainServlet extends HttpServlet { - private static final long ASYNC_TIMEOUT = 120000; + public static final String USER_ID = "userId"; - private static final String USER_ID = "userId"; + private static final long ASYNC_TIMEOUT = 120000; @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |