Can not send special characters (UTF-8) from JSP to Servlet: question marks displayed

前端 未结 1 688
日久生厌
日久生厌 2020-12-10 17:26

I have a problem sending special characters like cyrillic or umlauts from a jsp to a servlet. I would greatly appreciate your help here.

Here is what I have done:

相关标签:
1条回答
  • 2020-12-10 17:45

    Everything looks fine. Only the System.out.println() console also needs to be configured to interpret the byte stream as UTF-8.

    If you're sitting in an IDE like Eclipse, then you can do that by setting Window > Preferences > General > Workspace > Text File Encoding to UTF-8. For other environments, you should be more specific about that so that we can tell how to configure it.

    0 讨论(0)
提交回复
热议问题