Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
properties file exception
raj baig
Ranch Hand
Posts: 96
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 96
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
if i give the complete path it is fine working like
c:\\tomcat\web\app\WEB-INF\classes\xxx.prop
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Servlet Cannot find Find Properties File
Connection Pooling with Commons DBCP - spot the problem?
whats wrong with this code?
Retrive a property from a .properties file to JSP custom tag
Java.util.Properties Not Found During loading in Servlet/JSP Erro
More...