Mapping servlet to Hebrew (UTF-8) URL pattern

Viewed 1034

I am on a windows OS. Using tomcat 8. IDE - Netbeans 8. JDK1.8.0_05

I am trying to specify a hebrew url pattern for certain servlets. (I have tried both by setting the Urlpattern attribute of the @webservlet annotation and by placing in the web.xml file).

The Hebrew mapping doesn't work. I check to see what the mappings look like while Tomcat is running (By using the MBeans tab of JConsole) and the Hebrew url is displayed as gibberish (specifically, question marks).

I have tried:

  • Adding -J-Dfile.encoding=UTF-8 to netbeans.conf file.
  • Changing windows Locale to Hebrew.
  • Using the URLEncoded version of the url in the pattern (this is also displayed as gibberish symbols in JConsole).
  • Also tried entering the URL in its encoded form into the address bar (eg: localhost:8080/test/%D7%A2%D7%91).
  • Checked the encoding of the Servlet files in notepad, they save as UTF-8 (after making the first change described in this list).
  • I have a filter on all url patterns (ie: "/*") that sets the character encoding of the request to UTF-8 (Also tried Apache's SetCharacterEncodingFilter)

Any suggestions on how I can map to a hebrew (UTF-8) url with tomcat, netbeans, java, windows setup?

Thanks.

2 Answers
Related