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
pageB_jsp.class)
- 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
case?


Leon Rosenberg-3 wrote:
> 
> On Mon, May 26, 2008 at 3:59 PM, Jesse Klaasse <[EMAIL PROTECTED]>
> 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: 
http://www.nabble.com/Tomcat-5.5-caseSensitive%3Dfalse-and-work-dir-problem-tp17472465p17816552.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to