2

I need to have a WebFilter for an incoming request containing a russian text. the filter matches

https://application.com/deleted

but not

https://application.ru/удалено

i also tried to provide the encoded string as pattern, but it does not work. how to do it right?

is this possible while keeping the url "readable"?

thanks in advance!

@WebFilter(
    urlPatterns = { 
      "/deleted/*",      //EN
      "/удалено/*",      //RU, does not match

      "/%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%BE/*" 
      //RU, encoded using URLEncoder.encode("удалено", java.nio.charset.StandardCharsets.UTF_8.toString())

    }
)
public class UrlRewriteFilter implements Filter {
   //...
}
Steve
  • 384
  • 1
  • 7
  • 17

0 Answers0