How to Terminate a WebClient Session Via a Source Code

How to Terminate a WebClient Session Via a Source Code

  1. Create a source code object called “CloseSession” and add this code:

    javax.servlet.http.HttpServletRequest req = 
    (javax.servlet.http.HttpServletRequest) getApp().getFromUserStorage("javax.servlet.http.HttpServletRequest" );
    if (req != null) {
    javax.servlet.http.HttpSession sess = req.getSession();
    sess.invalidate();
    }
  2. Call this “CloseSession” source code each time you need terminate the WebClient session, this will not refresh the page so you may want call your login screen (your WebClient entry point function) to refresh the application. Example:

  3. Generate your functions and test them in Eclipse .