tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Klaasse <>
Subject Re: Tomcat 5.5 caseSensitive=false and work dir problem
Date Fri, 13 Jun 2008 07:14:55 GMT

I have implemented the "all lowercase" filter solution, which does the job
nicely. However, there is still one issue.. <jsp:forward>s don't go through
the filter chain, so when the forward page contains uppercase characters, a
file is created in the work dir with the uppercase character(s) in it. Then,
when a normal request via the browser is done to the same forward page,
Tomcat throws a NoClassDefFound exception because of a "wrong name" of the
temp file.

As an example, we have two jsp's:
- pageA.jsp (with a jsp:forward to pageB.jsp)
- pageB.jsp

Now, when we do this:
- request pageA.jsp in the browser (two temp files are created in the work
dir, pagea_jsp.class (lowercase 'a' because of the filter) and
- request pageB.jsp in the browser -> NoClassDefFound exception because
Tomcat is looking for pageb_jsp.class

I think Leon's suggested mapper solution would solve this problem for the
most part, but a mapper which is actually a complete file system tree seems
rather disk/cpu intensive to me. 

Can anyone think of another solution for the <jsp:forward> problem in this

Leon Rosenberg-3 wrote:
> On Mon, May 26, 2008 at 3:59 PM, Jesse Klaasse <>
> wrote:
>> Only thing I can think of now is to write a servlet filter which
>> converts all request URLs to lowercase.. But I am kind of hoping for a
>> more elegant solution.
> Personally I find your solution elegant :-)
> It would be maybe even more 'elegant' if you map your lowercase url
> via some mapping to the real name of the jsp internally, like:
> request EcHoSesSion -> Filter = echosession -> Mapper = EchoSession.jsp
> Of course the mapper has to be configured (or browse the file system)
> to determine the jsps real name. Alternatively you could rename all
> your jsps to lowercase and forget about the mapper. The advantage of
> the mapper (or the internal case-sensitivity) is that you webapp
> remains working on non-windows platforms... just in case, remember:
> write once, run anywhere :-)
View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message