Forums Register Login

getResourceAsStream

+Pie Number of slices to send: Send
In my struts application I am trying to read in my properties files using the following code.

InputStream dbpoolProp = DaoAccess.class.getResourceAsStream("dbpool.properties");

The only problem is the application doesn't know where to pull it from. Where does my file need to live? I was thinking i needed to define the path in the web.xml am I wrong? Please give me an example. . . .
+Pie Number of slices to send: Send
In this case, the file should be in the same directory as the class file for DaoAccess.
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 561 times.
Similar Threads
Hibernate Session.beginTransaction with JBoss
How to get the number of hits per page in java
custom javascript function in struts
Location for configuration files and hbm files
how to use javascript function in struts
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:19:23.