Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Oct 13, 2009 9:27 AM by
Sep 28, 2009 7:42 AM
Please, I am desperated because everything I do about it doesn´t work. Locally I get, but not on the web (linux/cpanel).
What I would like is to set everything used on JSP to UTF-8.
I tried server.xml:
...on java start up:
...inside the own jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
...but nothing works. The JSP insists in working on reading request.getParameter() just if was encoded with ISO-8859-1.
Please, give me some light. Thanks.
Edited by: LinkWS on Sep 28, 2009 5:40 AM
Edited by: LinkWS on Sep 28, 2009 5:41 AM
This content has been marked as final.
Show 1 reply
Oct 13, 2009 9:27 AM
in response to
Your JSP container is defaulting to ISO-8859 but your parameters are UTF-8 encoded.
You can work around your container with this code:
String value = new String(getParameter("param").getBytes("ISO-8859-1"), "UTF-8");
If you are using Tomcat, add the Connector attribute in server.xml, URIEncoding="UTF-8", otherwise Tomcat will assume ISO-8859 encoding to your parameters.