tags:

views:

43

answers:

1

how to get URL address while every time page is refreshed in java..? i'm doing projects which requires URL(domain name ) while every ti e page is refreshed..!!

+1  A: 

user request object to obtain url

// Getting servlet request URL

String url = request.getRequestURL().toString();

// Getting servlet request query string.

String queryString = request.getQueryString();



// Getting request information without the hostname.

String uri = request.getRequestURI();
Pranay Rana