-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michel,

On 9/5/2010 6:23 PM, michel wrote:
> ----- Original Message ----- From: "Hassan Schroeder"
> <hassan.schroe...@gmail.com>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Sunday, September 05, 2010 12:07 PM
> Subject: Re: URL Rewrite
> 
> 
> On Sun, Sep 5, 2010 at 8:38 AM, André Warnier <a...@ice-sa.com> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyJLlMACgkQ9CaO5/Lv0PDK3ACgiizrnYts6eQ/HlRJvPk0lYDW
/NIAnRPnNvfJPJZLXLDxvANEkHf7sD+I
=rX8w
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to