How to enable reading non-ascii characters in Servlets
- by Daziplqa
How to make the servlet accept non-ascii (Arabian, chines, etc) characters passed from JSPs?
I've tried to add the following to top of JSPs:
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
And to add the following in each post/get method in the servlet:
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
I've tried to add a Filter that executes the above two statements instead of in the servlet.
To be quite honest, these was working in the past, but now it doesn't work anymore.
I am using tomcat 5.0.28/6.x.x on JDK1.6 on both Win & Linux boxes.