tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Blumenthal" <dan...@wordchamp.com>
Subject getting the full URL
Date Wed, 01 Nov 2006 13:37:18 GMT
I'm trying to do what should be a fairly easy thing, but I'm really tearing
my hair out over this...
All I want is to be able to get the full URL (including scheme, queryString,
etc.).  Right now, I'm trying something like:
 
<%
out.write(request.getScheme() + ":/" +
request.getRequestURI().replace("jsp","do") +
(request.getQueryString().length() > 0 ? "?" + request.getQueryString() :
""));
%>
 
It feels like this should be a simple, single call. Any takers?
 
Thanks!
Daniel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message