File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
JSP
Author
properties file exception
raj baig
Ranch Hand
Joined: Jul 11, 2006
Posts: 96
posted
Nov 30, 2006 02:03:00
0
hi,
i am using properties file in jsp.And i stored this properties file in
classes folder but it is givine me the FileNotFound Exception
my code is:
try{ Properties p=new Properties(); FileInputStream input=new FileInputStream("xxx.properties"); p.load(input); String name=p.getProperty("username"); String password=p.getProperty("password"); //System.out.println("Hello World! " + name + "\t" + password); out.println(name); out.println("\n"); out.println(password); }catch(Exception e){ e.printStackTrace(); }
i also placed prop file in my app folder.
can you tell me the mistake.
raj baig
Ranch Hand
Joined: Jul 11, 2006
Posts: 96
posted
Nov 30, 2006 02:09:00
0
if i give the complete path it is fine working like
c:\\tomcat\web\app\WEB-INF\classes\xxx.prop
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: properties file exception
Similar Threads
Java.util.Properties Not Found During loading in Servlet/JSP Erro
whats wrong with this code?
Connection Pooling with Commons DBCP - spot the problem?
Servlet Cannot find Find Properties File
Retrive a property from a .properties file to JSP custom tag
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter