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:
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:
See also JSOS - the largest collection of servlets and filters. |
Also in JSOS:
|