public class XssDefenseFilter extends AbstractHttpFilter
XSS(Cross Site Scripting) 방어 필터
파라미터 값 중 스크립트 태그(<script...> ~ </script>)가 있는 경우, 태그를 텍스트화하여 사용되도록 한다.
Constructor and Description |
---|
XssDefenseFilter() |
Modifier and Type | Method and Description |
---|---|
void |
doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
HTTP 요청을 처리한다.
|
void |
init(javax.servlet.FilterConfig filterConfig) |
doFilter
destroy
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
init
in class AbstractFilter
javax.servlet.ServletException
Filter.init(javax.servlet.FilterConfig)
public void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException
AbstractHttpFilter
doFilter
in class AbstractHttpFilter
request
- HttpServletRequest 구현 클래스의 객체.response
- HttpServletResponse 구현 클래스의 객체.java.io.IOException
javax.servlet.ServletException