My servlet code looks like that:
response.setContentType("text/html; charset=UTF-8");
response.setCharacterEncoding("UTF-8");
ServletOutputStream out = response.getOutputStream();
out.println(...MY-UTF-8 CODE...);
...
then I get the error:
java.io.CharConversionException: Not an ISO 8859-1 character: ש javax.servlet.ServletOutputStream.print(ServletOutputStream.java:89) javax.servlet.ServletOutputStream.println(ServletOutputStream.java:242) rtm.servlets.CampaignLogicServlet.doPost(CampaignLogicServlet.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
How can I switch the charset of Servlet's outputstream ???