How to Terminate a WebClient Session Via a Source Code
- 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();
}
- 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:
- Generate your
functions and test them in Eclipse .
Related Articles
Configuring Session Timeout in Apache Tomcat
The session timeout is the maximum length of time that Tomcat will retain the information pertaining to a user's session, in the absence of any user activity. This value is configurable per application as follows: Open the web.xml file of your Web ...
Customizing in CM WebClient
Attach point A template for a given screen can be generated from more than one template by using attach points. The templates are arranged in order from root to leaf. An attach point is a location defined in a template that other templates further ...
Running the Source Code Scanner
After an application subdirectory has been loaded into the scanning directory with a valid app.properties file, it will be entered into the source code scanner as a job with pending status. With a web browser on the scanning server, navigate ...
CM WebClient File Upload Setup
File Upload This guide will show you how to upload files to your Web Server from your WebClient application. 1. Import the attached zip Java Project into your Eclipse Workspace. 2. Right click your Java Project, and select Properties. Under “Java ...
Source Scanner for HLASM/ASM
This document describes the entities and relations the HLASM Scanner creates on encountering various ALC code constructs. Metrics The scanner computes a variety of standard code-line metrics, including: total lines of code comment line count blank ...