This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Uppercase / Lowercase URLs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Uppercase / Lowercase URLs" Watch "Uppercase / Lowercase URLs" New topic
Author

Uppercase / Lowercase URLs

Kristian Breifossmo
Greenhorn

Joined: Mar 01, 2005
Posts: 9
I'm not sure what to search for finding a solution to my problem so excuse me if an answer for my question exists elsewhere in this forum.

I have two urls which should do the same:

http://www.thesiteinquestion.com/Test

and

http://www.thesiteinquestion.com/test


As you can see the only difference is the upper/lowercase character in "test".


How would I configure Tomcat to treat these the same?

Any help appreciated!


<ul type="square"><br /><li><a href="http://kb.zapto.org/Kristian/sd_index.jsp" target="_blank" rel="nofollow">Kristian Breifossmos hjemmeside</a><br /> <br /><li><a href="http://kb.zapto.org/Marthe/sd_index.jsp" target="_blank" rel="nofollow">Marthe Buseths hjemmeside</a><br /></ul>
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can't.
Tomcat was written to adhere to the HTTP spec in which it states that URIs are to be case sensitive.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56521
    
  14

You'd have to create two mappings that point to the same servlet.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Fedor Smirnoff
Ranch Hand

Joined: Apr 21, 2003
Posts: 45
You can also try URL rewriting with Apache
Julie Chen
Greenhorn

Joined: Jun 24, 2005
Posts: 2
because the file name is case sensitive.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Uppercase / Lowercase URLs
 
Similar Threads
Quite a day for DDoS attacks, folks!
AWT/SWING & Middleware
case insensitive context
URL.openStream()
Model Driven Architecture