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
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://";
2 matches
Mail list logo