NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
In a regular servlet, I'm trying to do the following: InputStream forms = getServletContext().getResourceAsStream(/WEB-INF/validation.xml); But it's throwing a NPE, and validation.xml is in my WEB-INF folder. Any ideas why this may be happening? Thanks, Matt

Re: NPE with getResourceAsStream

2003-05-31 Thread Michael Ruppin
What's getServletContext() returning? null? m --- Raible, Matt [EMAIL PROTECTED] wrote: In a regular servlet, I'm trying to do the following: InputStream forms = getServletContext().getResourceAsStream(/WEB-INF/validation.xml); But it's throwing a NPE, and validation.xml is

Re: NPE with getResourceAsStream

2003-05-31 Thread Kris Schneider
Are you doing this in the constructor or an overridden init(ServletConfig) that hasn't invoked super.init(config)? Quoting Raible, Matt [EMAIL PROTECTED]: In a regular servlet, I'm trying to do the following: InputStream forms =

RE: NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
I'm doing this in an execute(request,response) method that both doGet() and doPost() call. -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 12:39 PM To: Struts Users Mailing List Subject: Re: NPE with getResourceAsStream Are you doing

RE: NPE with getResourceAsStream

2003-05-31 Thread Kris Schneider
To: Struts Users Mailing List Subject: Re: NPE with getResourceAsStream Are you doing this in the constructor or an overridden init(ServletConfig) that hasn't invoked super.init(config)? Quoting Raible, Matt [EMAIL PROTECTED]: In a regular servlet, I'm trying to do the following

RE: NPE with getResourceAsStream

2003-05-31 Thread Raible, Matt
into gear. Matt -Original Message- From: Raible, Matt Sent: Friday, May 30, 2003 12:55 PM To: 'Struts Users Mailing List' Subject: RE: NPE with getResourceAsStream I'm doing this in an execute(request,response) method that both doGet() and doPost() call. -Original Message- From

RE: NPE with getResourceAsStream

2003-05-31 Thread Kris Schneider
RegistrationServlet(); servlet.init(config); -- Adding this fixed the problem. } Thanks for kicking my brain into gear. Matt -Original Message- From: Raible, Matt Sent: Friday, May 30, 2003 12:55 PM To: 'Struts Users Mailing List' Subject: RE: NPE with getResourceAsStream I'm

Re: NPE with getResourceAsStream

2003-05-31 Thread Denis Avdic
. } Thanks for kicking my brain into gear. Matt -Original Message- From: Raible, Matt Sent: Friday, May 30, 2003 12:55 PM To: 'Struts Users Mailing List' Subject: RE: NPE with getResourceAsStream I'm doing this in an execute(request,response) method that both doGet() and doPost() call