Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Web application and Class.getResource() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Web application and Class.getResource()" Watch "Web application and Class.getResource()" New topic
Author

Web application and Class.getResource()

sergiy
Greenhorn

Joined: Aug 03, 2001
Posts: 1
Hello everybody.
I have some web application and I have some util classes in it. There I try to get the input stream for the properties file stored in my web application along with class files in the corresponding package (let's say com/a/b/c/fff.properties). So I use Class.getResource(com/a/b/c/fff.properties) to get it. But it does not work.
I use Weblogic 5.1 with SP9. Where am I wrong?
Best regards,
Sergiy.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

"sergiy"
your name doesn't comply with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at http://www.javaranch.com/name.jsp
Thanks for your cooperation.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Web application and Class.getResource()
 
Similar Threads
What is the best practice to add the application property files to the classpath?
Locating a jar file relative to the application
Need help in compiling programs
Where does this package go?
Connection to Progress Database