| Author |
opening a file in web-inf
|
Johnny Gara
Ranch Hand
Joined: Mar 09, 2007
Posts: 43
|
|
I'm trying to open a config file that's located in web-inf/config/config.xml and was wondering what the best way to do so is. Is it possible to open this file using classloaders? Or can you simple just try to open a stream to /web-inf/config/config.xml in your war file? thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56222
|
|
It's WEB-INF, not web-inf. ServletContext.getResourceAsStream() [ July 31, 2008: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Johnny Gara
Ranch Hand
Joined: Mar 09, 2007
Posts: 43
|
|
ah, you are correct, thanks Bear for completeness, the correct call would be ServletContext.getResourceAsStream( "/WEB-INF/conf/config.xml");
|
 |
 |
|
|
subject: opening a file in web-inf
|
|
|