Clear session filter ver. 1.1


This is a Java servlet filter (as per Servlet API 2.3). Clear session filter lets you invalidate session in your web applications. For example, disable so called sticky sessions.

How to use it:

a) download clearsessionflt.jar and save it in WEB-INF/lib

b) describe this filter in web.xml.
 


<filter>
  <filter-name>ClearSession</filter-name>
  <filter-class>com.cj.clearsession.ClearSessionFilter</filter-class>
</filter>

c) describe a mapping for this filter in web.xml
 


<filter-mapping>
  <filter-name>ClearSessionFilter</filter-name>
  <url-pattern>/myapp/login</url-pattern>
</filter-mapping>

in this case filter will be on for each request to /myapp/login etc.

Also you can set the following initial parameters:
еxclude - describes a commas separated list of files (requests) to be excluded from the processing. By default is not defined

For example:
 


<filter>
  <filter-name>ClearSessionFilter</filter-name>
  <filter-class>com.cj.clearsession.ClearSessionFilter</filter-class>
  <init-param>
    <param-name>exclude</param-name>
    <param-value>/myapp/refresh</param-value>
  </init-param>
</filter>

   For downloading:
    Filter:  clearsessionflt.jar

 ©  Coldbeans     Comments?

See also JSOS - the largest collection of servlets and filters.

Also in JSOS: