com.atlassian.jira.web.filters
Class PathMatchingEncodingFilter

java.lang.Object
  extended by com.atlassian.core.filters.AbstractHttpFilter
      extended by com.atlassian.jira.web.filters.PathMatchingEncodingFilter
All Implemented Interfaces:
javax.servlet.Filter

public class PathMatchingEncodingFilter
extends com.atlassian.core.filters.AbstractHttpFilter
implements javax.servlet.Filter

Filter that applies appropriate encoding to request/response depending on the servlet path.

For some paths (currently only REST API) we want to always enforce standard (UTF-8) encoding, for others the traditional, JIRA application property-based filter is used.

Since:
v4.2

Constructor Summary
PathMatchingEncodingFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
           
 void init(javax.servlet.FilterConfig filterConfig)
           
 
Methods inherited from class com.atlassian.core.filters.AbstractHttpFilter
doFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.Filter
doFilter
 

Constructor Detail

PathMatchingEncodingFilter

public PathMatchingEncodingFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Overrides:
init in class com.atlassian.core.filters.AbstractHttpFilter
Throws:
javax.servlet.ServletException

doFilter

public void doFilter(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     javax.servlet.FilterChain filterChain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in class com.atlassian.core.filters.AbstractHttpFilter
Throws:
java.io.IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter
Overrides:
destroy in class com.atlassian.core.filters.AbstractHttpFilter


Copyright © 2002-2010 Atlassian. All Rights Reserved.