title: How to solve UTF-8 in java
body: <p>I currently use</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%&gt;
  </code></pre>
  
  <p>in my jsp page.</p>
  
  <p>And when I get data from textbox using <code>request.getParameter("...");</code> it retrieves data like that <code>Ã¶É?É?É?Ã¶Ä°</code> . I saw this problem when I used characters that are not english chars. I add <code>URIEncoding="UTF-8"</code> to <code>server.xml</code> in tomcat. But it retrieved the same <code>(Ã¶É?É?É?Ã¶Ä°)</code>. How to solve it?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks for your answers. I tried a few things, but nothing has fixed the problem.</p>
  
  <p>Here's what I've done:</p>
  
  <ul>
  <li><p>I added <code>&lt;Connector URIEncoding="UTF-8" .../&gt;</code> in server.xml.</p></li>
  <li><p><code>&lt;meta ... charset=utf-8&gt;</code> tag is ok and I tried <code>request.setCharacterEncoding("UTF-8");</code></p></li>
  <li>I also tried <code>&lt;filter&gt;</code> tag in web.xml</li>
  </ul>
  
  <p>None of these actions fixes the problem. I'm wondering if there's something else wrong with this...(remembering: I used <code>&lt;form method='post'&gt;</code>. I click submit button and when I get data using <code>request.getParameter("..")</code> the format of this data is not the correct format. )</p>