|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter
public class SetCharacterEncodingFilter
Example filter that sets the character encoding to be used in parsing the incoming request, either unconditionally or only if the client did not specify a character encoding. Configuration of this filter is based on the following initialization parameters:
ignore
initialization parameter. This parameter
is required, so there is no default.selectEncoding()
method is set. If set to "false,
selectEncoding()
is called only if the
client has not already specified an encoding. By default, this
parameter is set to "true".Although this filter can be used unchanged, it is also easy to
subclass it and make the selectEncoding()
method more
intelligent about what encoding to choose, based on characteristics of
the incoming request (such as the values of the Accept-Language
and User-Agent
headers, or a value stashed in the current
user's session.
Constructor Summary | |
---|---|
SetCharacterEncodingFilter()
|
Method Summary | |
---|---|
void |
destroy()
Take this filter out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Select and set (if specified) the character encoding to be used to interpret request parameters for this request. |
void |
init(javax.servlet.FilterConfig localFilterConfig)
Place this filter into service. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SetCharacterEncodingFilter()
Method Detail |
---|
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
request
- The servlet request we are processingresult
- The servlet response we are creatingchain
- The filter chain we are processing
IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet error occurspublic void init(javax.servlet.FilterConfig localFilterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
localFilterConfig
- The filter configuration object
javax.servlet.ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |