org.mycore.frontend.filter
Class MCRUserAgentFilter
java.lang.Object
org.mycore.frontend.filter.MCRUserAgentFilter
- All Implemented Interfaces:
- Filter
public class MCRUserAgentFilter
- extends Object
- implements Filter
Automatically closes HttpSession of certain user agents.
If the User-Agent header matches a regular expression
defined by the property MCR.Filter.UserAgent
(default: "(bot|spider|crawler|mercator|slurp|seek|nagios)") the
HTTP session is closed after the request.
- Author:
- Thomas Scheffler (yagee)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MCRUserAgentFilter
public MCRUserAgentFilter()
init
public void init(FilterConfig arg0)
throws ServletException
- Specified by:
init in interface Filter
- Throws:
ServletException
destroy
public void destroy()
- Specified by:
destroy in interface Filter
doFilter
public void doFilter(ServletRequest sreq,
ServletResponse sres,
FilterChain chain)
throws IOException,
ServletException
- Specified by:
doFilter in interface Filter
- Throws:
IOException
ServletException