I use JSP to display information for the user, and if I do not specify the encoding, then instead of Russian characters I get hieroglyphs. I do not use frameworks like Spring only the native Servlet API .

I fix it like this: request.setCharacterEncoding("UTF8"); but I don’t like it, it looks like a crutch in every servlet writing it.

Is there a way to do this once and for all? Maybe somewhere there is a file with settings or something else? Tell me please. Thank.

  • 2
    can i use java filter like this , will this option work? - MrFylypenko
  • @MrFylypenko what you need! Thank. - Pavel
  • Why not ask in JSP? - Alex78191
  • @ Alex78191 asking this is not enough - Pavel

0