title: how to get URL from address bar in JSP
body: <p>Lets say I hit </p>
  
  <blockquote>
    <p><code>http://localhost/webapp/wcs/stores/servlet/en/marksandspencer/l/women/dresses/party-and-cocktail-dresses</code></p>
  </blockquote>
  
  <p>and this internally redirects me to custom 404.jsp page, But URL remain same in address bar.</p>
  
  <p>I tried this code - <code>&lt;%= request.getAttribute("javax.servlet.forward.request_uri") %&gt;;</code> and it's returning me the path of 404.jsp</p>
  
  <p>How can I get the entered URL which is there in address bar?</p>