We recently added a JSP page to one of our CFML applications. Everything was working fine until one of us typed in the full path to the application instead of using a bookmark, at which point we got this error:
500 jrun__move2test__act_checkout2ejspd
(wrong name: jrun__Move2Test__act_checkout2ejspd)
The problem is that JSP applications, at least running under JRun, are case sensitive in matching the entire file name including the path. In our case we’re not concerned with the file name of the JSP page itself since the user never sees it; it’s used intenrally. However, the user can type in the path and that is what’s causing the problem.
To address this issue we came up with a short routine that checks the path entered by the user against the real path for differences in case. If there is a difference it relocates, correcting the case. This will cause form submissions to fail if the problem is with your own code using the wrong case but works fine for pages where the user enters the URL directly.
function getPathFromFilePath(filePath) {
var l = len(getFileFromPath(filePath));
if (l) {
return left(filePath, len(filePath) - l);
} else {
return filePath;
}
}
Macromedia has a technote about capitalization in JRun.