Get the URLs - HTTP Connection

62 views Asked by At

I know that there are a lot of questions regarding this subject, but I still don't get it. I want to get the current URL from my browser in my program. What do I need to succeed? The connection has to be made with HTTP Connection? A proxy server would help me more? because i have to filter those URLs. Help me please, I am so confused.

1

There are 1 answers

0
kamoor On
request.getRequestURL();

will get you the URL from HttpServletRequest. More documentation can be found in https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html