tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: URL Rewrite
Date Thu, 09 Sep 2010 18:58:27 GMT
Hash: SHA1


On 9/5/2010 6:23 PM, michel wrote:
> ----- Original Message ----- From: "Hassan Schroeder"
> <>
> To: "Tomcat Users List" <>
> Sent: Sunday, September 05, 2010 12:07 PM
> Subject: Re: URL Rewrite
> On Sun, Sep 5, 2010 at 8:38 AM, André Warnier <> wrote:
>> The right solution would be to make sure that all the relative links
>> in your
>> pages, when they are interpreted by the browser and requested from the
>> server, are also being caught by the rewriting mechanism on the
>> server, and
>> properly redirected to where they should.
> Or, uh, just don't *ever* use relative links, period.
> ---------------------------------------------------------------
> Sorry, but I don't understand why. In most cases relative links are
> great, simply because they are 'self-updating' when the page gets moved.
> Hard-coding is a last-resort solution.

Relative links become problematic precisely /when/ they are moved
around: all your relative links are broken. Also, when you start playing
games with the URL your web browser sees (rewrites, etc.) and including
files, etc., you will inevitably run into a situation where your
relative path is nonsensical.

Using absolute URLs is very easy using the tools provided by the servlet
API, and, IMO, no less convenient than using relative ones. I believe
using absolute URLs solves all of the problems I've outlined above, too.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message