I'm having trouble with character encoding for web applications. There is a pop up that queries the database with user input (search for a person by name). The problem is that the pronunciation characters are being transformed into weird letters such as What have I done? Primarily, follow. I have apache2.2 and tomcat 6 installed. I do not know what else to do and neither relevant information should be posted to me (please tell me if you need anything) ... Thank you in advance. Ensure that the encoding is also set at the database and the JDBC driver level. How to do this depends on the build / version of DB and JDBC driver. Consult the DB and JDBC driver specific documents for details. For example, for the MySQL JDBC driver, you need to add two specific parameters for JDBC Connection URL. By the way, there is no effect on setting up XML file encoding and the HTTP request / response encoding of the meta tag. For a JSP / Seral based web application, only the following should be configured: For HTTP requests received, configure it at the server level. In Tomcat, this For HTTP post requests, use a filter which is By JSP generated for HTTP responses, For HTTP responses generated by servlets (which does not include any JSP) in entry At least, make sure that your source code files are also saved as UTF-8 exact configuration depends on the editor to be used. In the case of Eclipse, you can make it window & gt; Properties & gt; General & gt; Workspace & gt; Text file encoding . ó = & gt; One ?? One ³ . This is a very simple problem but I can not understand what is happening.
(The Request and Response) .setCharacterEncoding ("UTF-8");
Web.xml ,
server.xml character encoding parameter
& lt ;? XML version = '1.0' encoding = 'utf-8'? & Gt; .
text / html;
URI encoding attribute
& lt; Connector & gt; is done by setting in Tomcat's
server.xml .
ServletRequest # setCharacterEncoding () .
and <%> page%> on the Per-JSP basis Set the
page encoding attribute of, or better, set
& lt; Page-Encoding & gt;
web.xml . !)
ServletResponse # setCharacterEncoding () .
Also see:
Comments
Post a Comment