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
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
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 =
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
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
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
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
.
}
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
8 matches
Mail list logo