Package chapters.mdc
Class UserServletFilter
java.lang.Object
chapters.mdc.UserServletFilter
- All Implemented Interfaces:
javax.servlet.Filter
A simple servlet filter that puts the username
found either in the Principal.
The value is removed from the MDC once the request has been fully processed.
- Author:
- Sébastien Pennec
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
UserServletFilter
public UserServletFilter()
-
-
Method Details
-
destroy
- Specified by:
destroy
in interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
init
- Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-