tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat 6.0.18 access files case-insensitive
Date Thu, 11 Jun 2009 10:32:45 GMT
Alexander Diedler wrote:
> Hello,
> We have an Application based on IIS 6.0 and Tomcat 6.0.18. In this
> Application will be opened a PDF (href=start.PDF). In this PDF are many
> links to other documents, that will be opened in the browser. (KapA.PDF,
> KapB.PDF). Now the distributor deliver updatefiles with changing extensions
> or names.  The link is KapA.PDF in the overview, but the file is called
> KapA.pdf on filesystem and Tomcat said 404 because "PDF" not equal "pdf".
> Also it can be kapb.pdf in Overview and filesystem KAPB.PDF
> Is there are any option to disable case-sensitive on Tomcat or it is a
> "base-feature" of Java architecture?
It's not a "base feature" of either Java or Tomcat, it's a base feature 
of the OS.  Windows filesystems are (relatively, see below) 
case-insensitive, Unix/Linux are absolutely case-sensitive.  Since Java 
and Java applications are supposed to run on both, they have to choose. 
  By default, Tomcat acts case-sensitive.
You can disable that, but I would be very careful if I was you, because 
you may trigger a whole bunch of other problems, for instance with 
access security.
The real problem here is the inconsistency of the original documents. 
You should tell your supplier to be consistent.  Or else, you should 
filter the documents when you receive them, and replace the links by 
consistent ones.  There exists PDF-handling softare that allows you to 
do that kind of thing.
Or else, you should implement a servlet filter which takes care of these 
links in particular, and make sure that when /you/ write documents to 
your filesystem, you always write them in a consistent way.
Even under Windows, you can /force/ filenames to be all lowercase on 
disk.  Windows creates and stores filenames in the upper/lower case that 
you specify.  It is just at retrieval time that Windows acts in a 
case-insensitive fashion.

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

View raw message