How to handle case sensitive file name problem

Discussions

Web tier: servlets, JSP, Web frameworks: How to handle case sensitive file name problem

  1. How to handle case sensitive file name problem (2 messages)

    Hi All,
    We are using weblogic4.5.1.We are running into a problem which i feel most user would have faced.The problem is this,
    In our application we have a file called Login.jsp.

    In the browser URL if the user types http://server:port/login.jsp ie. with a small 'l' he gets a 404 file not found error.

    Can any one tell me how to solve the issue.Our first idea was to create a login.jsp and then forwad to Login.jsp from that file.But NT is case insensitive on file names so we cant use that option.

    thanks.
  2. I don't know a solution, but I do know that it's behaving normally, even for NT. A while ago, there's a bug in JavaWebserver and some other application serves, including weblogic. If you type in a url, say, http://whatever/jsp/login.JSP (instead of login.jsp),
    the server didn't recognize that you are requesting for a jsp. Since it doesn't understand the MIME type JSP, it will just return the file, exposing your business logic. They have fixed this, therefore, you file names have to be case sensitive.
  3. i think there's not much u can do here and have to type in the correct file name in the url. this is because any webserver has an temporary directory for storing the class files (as u must be knowing that jsp is converted to java fileie servlet and compiled to class file) generated from the jsp. the name of the class file is formed from the name of the jsp file + some other characters like _xjsp etc. so if login.jsp produces login_xjsp.class file then in url if u request Login.jsp it will look for Login_xjsp.class which it doesnt find and hence the 404 error. hope this helps. bye.