chkal/pf-issue-test — Issue #32: Add character encoding info to FAQ
Author: chkal
Created: 2012-03-06 07:20:09+00:00
State: open

Originally filed by **lincolnb...@gmail.com** on 2010-02-18T16:35:31

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=31

Hi Lincoln,

first of all thanks for response and GREAT THANKS for you library.

>>Do you believe this is something PrettyFaces should be doing for you? If
it is, it's possible we could include it.

No - its unnecessary to include such kind of functionality in all
applications, it should depend on an application requirements.

Just dont forget that this filter should be executed before any other
filters - I made typo in web,xml which caused my problem.

filter source code:
public void init(FilterConfig config) throws ServletException {
//No-op
}

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws
IOException, ServletException {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
chain.doFilter(request, response);
}

public void destroy() {
//No-op
}