|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ibisph.filter.SetCharacterEncodingFilter
public class SetCharacterEncodingFilter
Filter that simply sets the character encoding for a downstream/chained request. This allows for form character data to be processed as it was served to the browser (consistently) when accessed via a request.getParameter() type call. This typically isn't a problem for those server enviros that have one or two apps and can set the character encoding to the match the app. It can be an issue if the app server is set for some other character set and this app is different. Since ISO-8859-1 is a subset of UTF-8 it shouldn't be an issue but this filter can be used to set explicitly just in case.
| Field Summary | |
|---|---|
protected java.lang.String |
characterEncoding
|
| Constructor Summary | |
|---|---|
SetCharacterEncodingFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Required method - Does NOT do anything. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
Method that actually sets the downstream request's character encoding to be used. |
void |
init(javax.servlet.FilterConfig filterConfig)
Sets the filter's control properties via the init-parameters (located in the application's deployment web.xml file). |
void |
setCharacterEncoding(java.lang.String characterEncoding)
Property setter for the character encoding to be used for posts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String characterEncoding
| Constructor Detail |
|---|
public SetCharacterEncodingFilter()
| Method Detail |
|---|
public void setCharacterEncoding(java.lang.String characterEncoding)
characterEncoding - Value used for downstream code when request's
request's parameter value is asked for. This value controls
how a parameter is decoded.
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.FilterfilterConfig - allows the init method to access filter and servlet
objects.
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOException
javax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||