0

I want to get the URL of current page from address bar and pass on to href of hyperlink. Actually i am generating a dynamic url by passing the parameters with request. so if i use r

request.getRequestURL().toString();

it gives me only the name of servlet not the full url like

servlet?brand=optimum&price=20;

Is there any way to get complete url of address bar in jsp? Thanks in advance

user3660263
  • 135
  • 1
  • 1
  • 13
  • Any other suggestions apart form this duplicate link.. – user3660263 Jun 07 '14 at 18:16
  • By following your link i tried String yurl= (String) request.getAttribute("javax.servlet.forward.request_uri"); But i showing a null value when i am writing it in a servlet. – user3660263 Jun 09 '14 at 06:11

0 Answers0