Re: Absolute URLs

2004-08-20 Thread Michael McGrady
Toby Saville wrote: Is there any way I can make URL's generated by struts, be absolute including the protocol, hostname and port? Thanks One response showed you how to get the absolute URL of a request, but I don't know if that is what you want. The answer to your question depends, I suspect, on

Re: Absolute URLs

2004-08-19 Thread jthompson
There are probably better ways, but I've used the following java code for that purpose. public static String getFullURL(HttpServletRequest request) { if (request==null) return null; StringBuffer url = new StringBuffer(); url.append( (request.isSecure() ? "https://"; : "http://";