aspose file tools*
The moose likes Tomcat and the fly likes case insensitive context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "case insensitive context" Watch "case insensitive context" New topic
Author

case insensitive context

Brad Carson
Greenhorn

Joined: Sep 02, 2005
Posts: 7
I'm running IIS 5.0 and Tomcat 5.0.25 on a Win2k server with the ajp13 connector. Requests to http://myserver.com/TEST/ work but requests to http://myserver.com/test/ fail. How can I configure it such that requests to both will work?

I've tried a variety of things including IIS redirects, and settings in the rewrite.properties and uriworkermap.properties but nothing seems to work! Any help would be very much appreciated!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60055
    
  65

There is no way to set things up so that the context path is case insensitive.

Seems like a rather odd thing to want to do, but you can approximate it by creating mutliple contexts that point to the same web app on disk, each with the different name that you want to use.

Note that this will create separate web apps, and so things like the application context will not be shared.
[ October 04, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Brad Carson
Greenhorn

Joined: Sep 02, 2005
Posts: 7
Oh... you're kidding, right?

Well, the context is actually an acronym which is why it was created uppercase but I know the users are going to mess up the url and type it in lowercase which will get them absolutely nowhere.

I find it a little strange that it is Tomcat that throws the 404 when accessing the lowercase context (e.g. http://myserver.com/test) and not IIS (since Tomcat is only configured for the uppercase url).
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

IIS is probably the only web/app server out there that doesn't follow the HTTP specs as far as case sensitivity in URLs is concened.


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: 60055
    
  65

My advice? Acronym or not, make it lowercase.

URLs aren't really the place to worry too much about grammatical-correctness.
[ October 04, 2006: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: case insensitive context
 
Similar Threads
JSP/ Servlet Post Question
Redirecting context paths in Tomcat 5.5
Can I run IIS and j2ee web servers on the same machine
Error 400: Invalid path /main was requested
.htaccess