title: Java HttpServletRequest get URL in browsers URL bar
body: <p>So I'm trying to grab the current URL of the page using Java's request object. I've been using request.getRequestURI() to preform this, but I noticed that when a java class reroutes me to a different page off a servlet request getRequestURI gives that that address as opposed to the orginal URL that was typed in the browser and which still shows in the browser.</p>
  
  <p>Ex: \AdvancedSearch:<br>
  <code>getRequestURI()</code> returns "\subdir\search\search.jsp"</p>
  
  <p>I'm looking for a way to grab what the browser sees as the URL and not what that page knows is only a servlet wrapper.</p>