struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <>
Subject Re: about DAO
Date Mon, 03 Mar 2008 11:26:15 GMT
hns wrote:
>     	InputStream is = getClass().getResourceAsStream("/");

Don't include a leading slash unless you really mean the root directory 
(which you shouldn't do in a webapp).

Instead, this line:

InputStream is = getClass().getResourceAsStream("");

will look for the file in the base of the classpath. (eg 
WEB-INF/classes/ or in a jar)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message