javax.servlet.Filter
public class SetRequestCharacterEncoding extends Object implements javax.servlet.Filter
Modifier and Type | Field | Description |
---|---|---|
static String |
DEFAULT_ENCODING |
Constructor | Description |
---|---|
SetRequestCharacterEncoding() |
Modifier and Type | Method | Description |
---|---|---|
void |
destroy() |
Reset the filter settings.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain) |
Set the character encoding in the request.
|
String |
getEncoding() |
Returns the encoding of the request.
|
javax.servlet.FilterConfig |
getFilterConfig() |
|
void |
init(javax.servlet.FilterConfig filterConfig) |
Initialize the filter.
|
void |
setEncoding(String value) |
Sets the encoding of the request.
|
void |
setFilterConfig(javax.servlet.FilterConfig filterConfig) |
public static final String DEFAULT_ENCODING
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
request
- the current ServletRequest objectresponse
- the current ServletResponse objectfilterChain
- the current FilterChainIOException
- if any io error occursjavax.servlet.ServletException
- any other servlet error occurspublic void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
filterConfig
- the current filter configurationjavax.servlet.ServletException
public String getEncoding()
public void setEncoding(String value)
public void destroy()
destroy
in interface javax.servlet.Filter
public javax.servlet.FilterConfig getFilterConfig()
public void setFilterConfig(javax.servlet.FilterConfig filterConfig)
Copyright © 2002–2019 itracker. All rights reserved.