Q:

Reading Korean characters from Tomcat Servlet

My server cannot receives Korean characters through a POST request and cannot writes them to console.
Here is my code:
protected void doPost(HttpServletRequest request,
        HttpServletResponse response) throws IOException {
    request.setCharacterEncoding("UTF-8");
    PrintWriter out = response.getWriter();

    StringBuffer buffer = new StringBuffer();
    String line = null;
    BufferedReader reader = request.getReader();
    while ((line = reader.readLine()) != null)
        buffer.append(line);
    String requestMessage = buffer.toString();

    //working
    System.out.println("teniszütő");
    //not working (???????)
    System.out.println("\uc548\ub155\ud558\uc138\uc694\uc138\uacc4");
    //not working (??)
    System.out.println("여니");
    //accents are working, Korean characters aren't
    System.out.println(requestMessage);
    //writing 3F (the code of the ? instead of the code of the character)
    System.out.println(bytesToHexString(requestMessage.getBytes()));

    out.println("Answer");

}

I use Eclipse and if I check the Properties of the project I can see that the "Text file encoding" is "Inherited from container (UTF-8)". If I make a normal HelloWorld application (with the same settings), it prints the Korean characters.
Thank you for help!

A:

I found the solution. I have to set URIEncoding="UTF-8" in my <Connector> in server.xml like this:
<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443"
           URIEncoding="UTF-8"                 />

