Is it really necessary to have the LinkTag [and RedirectTag] use the
RequestUtils.absoluteURL() method when the "forward" or "page" attribute is
specified?
Doing so for LinkTag (obviously) causes the generated URL to be an absolute
URL (e.g., "http://jakarta.apache.org/struts/index.html" as opposed to a
relative URL [w.r.t. the web app] like "/struts/index.html"). However, for
web applications deployed with a SSL accelerator, the web container will not
have the correct URL scheme and port. In this case (and in most cases in
general), one would want to keep all links in the HTML within the web
application relative to the scheme, server, and port -- so you would not
want to explicitly specify those in general.
(If you are not familiar with SSL accelerators, they are hardware that sit
in front of your web server and translate HTTPS to HTTP such that your web
server sees the web request as regular HTTP. The HTTP response generated by
the web server is then translated to HTTPS before being send down to the
client. [At least this is how the SSL accelerator that we are using works
(Intel NetStructure 7115).] Purpose of the accelerator is to off-load the
work of SSL encryption/decryption to dedicated hardware as opposed to the
web servers.)
While I can see the benefit of using absolute URLs in a page (say your HTML
<base> tag points to a different scheme, server, port, etc. such that for a
link, you would want to have the URL be absolute since the link's schema,
server, etc. are different), that scenario is probably not the normal case.
So does anyone think I should submit this to
"http://nagoya.apache.org/bugzilla/"?
-- Stoehr
P.S. For the RedirectTag, since the Servlet API spec says that
response.sendRedirect() can accept relative URLs just fine,
RequestUtils.absoluteURL() should not be needed as well -- and for
consistency, should be removed as well if it is removed for LinkTag. This
does not necessarily help when you are using an SSL accelerator because when
the web container via response.sendRedirect() formulates the absolute URL
(since HTTP protocol expects an absolute URL in the redirection response),
the web container is going to think that the scheme is HTTP when in fact we
want it to be HTTPS.