tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <wi...@msoft.com>
Subject Re: making file case insensitive
Date Fri, 21 Feb 2003 21:41:56 GMT
> From: "Peter Choe" <choepete@mindspring.com>
> Sent: Friday, February 21, 2003 12:25 PM
> Subject: making file case insensitive


> is there a way to make tomcat serve html files regardless of the case of
> the file?

Sure, easy. Run it on top of Windows or Mac OS X on an HFS file system, as
they're both case insesitive file systems.

Other than that, I'd make it a point to make sure your file names match the
actual files.

The problem is two fold.

One, you essentially want to open (using crude regex syntax) the file name
[Hh][Ee][Ll][Ll][Oo].[Hh][Tt][Mm][Ll].

This means that the file open code must scan the directory and perform this
match on the each of the results rather than rely on the file system to do
it instead. As you can imagine, the file system will do this MUCH faster
than Java/Tomcat can.

Second, you have the issue of potential name conflicts. If you have both
Hello.html and hello.html, which file is supposed to be opened, as they are
different in a case sensistive file system, and also most file systems don't
sort their file names internally, so either one could come first in a
directory scan.

So, there is no quick fix. You need to take responsiblity for your file
names an be consistent with them.

Regards,

Will Hartung
(willh@msoft.com)




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message