This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat Cannot Find The properties File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Cannot Find The properties File" Watch "Tomcat Cannot Find The properties File" New topic

Tomcat Cannot Find The properties File

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I am trying to run my first Struts -- using the tutorial "Login" example at
There is a file that allows for all strings displayed in an application to be defined. Nonetheless, After I
entered http://localhost:8080/struts/jsp/LoginView.jsp
in the browser address bar, I got HTTP Status 500. I know that the LoginView.jsp file was found; otherwise, I would have gotten HTTP Status 404 -- LoginView file not found error.
The problem is that the text provided in the file could not be picked up - I think that it is because the Tomcat cannot find the file.
I have checked
1. name of the file: spelling is correct
2. location of the file: it is in the directory together with all compiled servlet class files; i.e. c:\tomcat\webapps\struts\WEB-INF\classes\test\struts
3. type of the file: the Windows Explorer shows the type of the file is a PROPERTIES File
The contents of the web.xml file that is in the c:\tomcat\webapps\struts\WEB-INF directory is shown below:

I need your experience in telling what else could go wrong. Please help.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17423

Windows users often forget that Java is picky about capitalization in filenames in cases where Windows itself doesn't care. But it looks like you did all that correctly.
I would double-check the log files to see if the 500 error was in fact due to inability to locate the resource and not something else. Also, don't accept Window's affirmation that just because Windows says it's a properties file that it really is. The actual determinant is that the filename ends with ".properties".
Since I can't see anything obviously wrong, if none of the above helps, check to make sure that the property name within the properties file is spelled and capitalized exactly as you invoke it in the JSP. Sometimes I find it useful to have someone double-check for me, since I have been known to see what "should" be there and not what actually is there.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat Cannot Find The properties File
It's not a secret anymore!