Thanks, I found something similar:
public InputStream getStream() throws IOException {
String fn =
this.getClass().getResource("/robots.txt").getFile();
return new FileInputStream(fn);
}
Tapestry Infodea wrote:
>
> Hi,
> try something like this:
>
> private st
Hi,
try something like this:
private static final String WEB_BASED_PATH = "resources/robots.txt";
try {
InputStream is =
Thread.currentThread().getContextClassLoader().getResourceAsStream(WEB_BASED_PATH);
DataInputStream din = new DataInputStream(is);