psdi.webclient.servlet

Class ConnectionServlet

  • java.lang.Object
    • javax.servlet.GenericServlet
      • javax.servlet.http.HttpServlet
        • psdi.webclient.servlet.ConnectionServlet
  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig


    public class ConnectionServlet
    extends javax.servlet.http.HttpServlet
    Responds to a ping that comes from browser through XMLHttpRequest to reset the web server session timeout. The response is used by javascript in the browser to sync itself to the session timeout again.

    This is useful in maintaining session active between the time user is inactive and the time he comes back and uses the application without making the request through hiddenframe (which was the only element that used to reset the session timeout until this class's need).
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Receives XMLHttpRequest from browser after the pre-logout session time-out threshhold has been reached.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConnectionServlet

        public ConnectionServlet()
    • Method Detail

      • doGet

        public void doGet(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.io.IOException,
                          javax.servlet.ServletException
        Receives XMLHttpRequest from browser after the pre-logout session time-out threshhold has been reached. Receiving this request should automatically reset the web server session. However, this Servlet needs to send reponse back to the frontend to restart its timer as well.
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException
        javax.servlet.ServletException
        See Also:
        HttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)