|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.web.filters.SetRequestCharacterEncoding
public class SetRequestCharacterEncoding
This class will set the chracter encoding of each request that uses the filter. It will use the encoding specifried in the init parameter, or if that is not present, fall back to a default value of UTF-8.
| Field Summary | |
|---|---|
static String |
DEFAULT_ENCODING
|
| Constructor Summary | |
|---|---|
SetRequestCharacterEncoding()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_ENCODING
| Constructor Detail |
|---|
public SetRequestCharacterEncoding()
| Method Detail |
|---|
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.Filterrequest - the current ServletRequest objectresponse - the current ServletResponse objectfilterChain - the current FilterChain
IOException - if any io error occurs
javax.servlet.ServletException - any other servlet error occurs
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.FilterfilterConfig - the current filter configuration
javax.servlet.ServletExceptionpublic String getEncoding()
public void setEncoding(String value)
public void destroy()
destroy in interface javax.servlet.Filterpublic javax.servlet.FilterConfig getFilterConfig()
public void setFilterConfig(javax.servlet.FilterConfig filterConfig)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||