You have to use ServletContext#getResourceAsStream to read resource files from your application. Check the API to see how to use it. I think that it should be better not to put your properties file with servlets.
even if i have placed .java file and .properties file in same folder , it is given "FileNotFoundException".
i am using Netbeans as an IDE .
Probably, you might have put your .properties file in the same location as that of .java/.class files. But it should be available in the classpath meaning where the classes are found.
In case of your java or class files under a specific package name say "com.mytest.servlets", you would have have your .java files under "com/mytest/servlets" folder.
For the .properties file, you are supposed to put the .properties in the "classes" direcly [which is present inside your "build" directory in case of NetBeans] and NOT inside "com/mytest/servlets" as that of your .java files. [ August 14, 2007: Message edited by: Raghavan Muthu ]