K
K
kudlayko2014-02-12 02:52:53
Java
kudlayko, 2014-02-12 02:52:53

Java + spring. How to implement a GET request with Cyrillic?

Hello.
Such a question, I'm making a website in java + spring, I ran into a problem with the Cyrillic alphabet. Everywhere is utf-8 encoding. On localhost (eclipse + tomcat 7), when sending a GET request from a client like mysite.com/page?q=hello
, an abracadabra of the format ÐºÐ¾Ð¼Ð¿Ñ arrives in the controller,
and the same assembled project and uploaded to the server passes as expected, understands Cyrillic.
The same, but the POST request passes here and there, it's fine.
I assume that the problem is not in the project, but in the settings of the server itself.
Is there a default setting for Tomcat itself to accept incoming values ​​in utf-8 encoding?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kudlayko, 2014-02-12
@kudlayko

Answer found.
In the server settings in the server.xml file, you need to add an encoding to the connector.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question