mandag den 12. januar 2009

TOMCAT UTF-8 gotcha

If you are having problem with your encoding running on a platform with other than UTF-8 as a default, try going through your code and make sure request.getParameter() is not called before setting request.setCharEncoding().


String adUser = request.getParameter(TAM_AD_USER);

If you have no hook for it, consider making a filter: