title: How to get full URL in JSP
body: <p>How would I get the full URL of a JSP page.</p>
  
  <p>For example the URL might be <a href="http://www.example.com/news.do/?language=nl&amp;country=NL" rel="nofollow">http://www.example.com/news.do/?language=nl&amp;country=NL</a></p>
  
  <p>If I do things like the following I always get news.jsp and not .do</p>
  
  <p><code>out.print(request.getServletPath());
  out.print(request.getRequestURI());
  out.print(request.getRequest());
  out.print(request.getContextPath());</code></p>