On 11/27/05, Werner van Mook <[EMAIL PROTECTED]> wrote:
> In my class which implements ServletContextListener I try to read a
> file.
>   it looks like :
>     parser.parse("friends.xml");
>
> When I start tomcat 5.5.12 I get a FileNotFound Exception on the
> friends.xml file.
>
> The file is in the root of my web-app.
> I also tried "/friends.xml" but alas it did not work.

Try using ServletContext's getResourceAsStream() method to find the
file, assuming that you have a 'parse' method that will take an
InputStream.

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to