I want the exact same method as getRequestURI(), but I want to use it on the referer. Is this possible?
I would like to turn http://www.example.com/my/path?vars=true
into /my/path
You want something like this?
String refererURI = new URI(request.getHeader("referer")).getPath();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With