title: how to retain utf-8 character encoding in tomcat with GET request
body: <p>From my JSP, I am sending a GET request with a parameter called <strong>jobDetails</strong> which contains some Chinese characters [encoded with URLEncoder.encode()]. Now in the doGET() of my servlet, I need to write the data to a file. When I do </p>
  
  <pre><code>request.getParameter("jobDetails"); // this one retrieves wrong characters
  </code></pre>
  
  <p>There is a solution for this setting the <code> URIEncoding="UTF-8"</code> in </p>
  
  <pre><code> &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
  </code></pre>
  
  <p>tag of Tomcat but our architect is hell bend on not to change the existing tomcat settings. I tried with setting  a filter for setting the characterEncoding() for <strong>request</strong> inside doFilter() as mentioned in <a href="http://balusc.blogspot.in/2009/05/unicode-how-to-get-characters-right.html#JSPServletRequest" rel="nofollow">BalusC's blog</a>. But this one works for POST requests only. Is there any other solution to this other than changing the Tomcat settings ? I am using Tomcat 6 and jdk 1.6.</p>