1 Reply Latest reply on Jan 27, 2003 6:39 PM by Greg Wilkins

    Context path is case sensitive -- workarounds?

    Michael Dinsmore Newbie

      Our company is moving from ServletExec to JBoss/Jetty. We're on W2K and ServletExec wasn't case sensitive for URL paths (i.e. http://foobar/sample and http://foobar/Sample were equivalent, as far as it was concerned).

      Jetty _IS_ case sensitive and now we need to be able to deploy our WAR so that if someone comes to http://foobar/sample or http://foobar/SAMPLE (or other variant) then it will find the deployed WAR file. Any god solutions to this?

      I thought an ear file with an application.xml file specifying permutations would work, i.e.:

      <?xml version="1.0" encoding="UTF-8"?>




      but it doesn't. Any ideas would be nice. This solution is something I'd have to run with for a little while until out customers have had plenty of time to make sure they point to the "proper" location.


        • 1. Re: Context path is case sensitive -- workarounds?
          Greg Wilkins Newbie

          URLs are specified as case sensitive and must be implemented as such.

          It is a security vulnerability for a container to case insensitive, as a security contraint on /sample/* would
          be bypassed with a request to /SaMpLe/secret.txt

          Containers actually got to a bit of effort to be case
          sensitive on operating systems like win2000.

          With Jetty, you can turn that off for file serving by
          turning off alias checking with the org.mortbay.util.FileResource.checkAliases system
          property. But this wont help with contexts.

          You could register a default context and default servlet
          that does a send redirect of /SaMpLe to /sample (maybe
          with a warning page).