Hi Dave

In your init(), do you call init() on the superclass?

   public void init (ServletConfig config) throws ServletException
   {
        super.init(config);
        // ....  your code here
    }

Failure to do so will lead to a null.

Regards
Alan
[EMAIL PROTECTED]

----- Original Message -----
From: David Mossakowski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 09, 1999 10:04 PM
Subject: Re: getResource returns null - still a problem and losing my mind


> Hi Bill,
>
> I tried doing what you suggested but then thought that because the
getResource
> is called on ServletContext then the servlet engine's class loader will be
> invoked no matter where the servlet is.
>
> When I moved the servlet to CLASSPATH location it still returned null.  As
far
> as the default classloader, then it is working fine, but I'd like to get
this
> to work to be able to request a resource from different server.
>
> I didn't get any reply from anyone about this problem.  It's either
because no
> one is using this call (unlikely) or no one has a problem with it.  I ask
> again: If getResource works for you in JRun, let me know.
>
> dave.
>
>
> Bill Burton wrote:
>
> > Hello David,
> >
> > Servlet engines that have their own custom class loader may not
implement
> > getResource or getResourceAsStream correctly.  Try moving your servlet
to
> > the classes directory or to a directory in the CLASSPATH so the default
> > classloader loads your servlet.  If this fixes the problem, then there's
a
> > bug in JRun's classloader.
> >
> > -Bill
> >
> > David Mossakowski wrote:
> > >
> > > Hi all,
> > >
> > > getResource and getResourceAsStream always return null in my servlet.
> > > I'm running the build 145 version of JRun on Enterprise 3.6 on NT.  I
> > > don't know what is the problem.
> > >
> > > If you're using JRun and this works for you please let me know (on my
> > > private address).
> > >
> > > Please help me 'cause I'm losing my mind.
> > >
> > > dave.
> > >
> > > --
> > > David Mossakowski        [EMAIL PROTECTED]
> > > http://www.dwdog.com/styk      212.310.7275
> > >
> > > "I don't sit idly by, I'm planning a big surprise"
> > > F         U         G         A        Z        I
> >
> > --
> > Bill Burton, Senior Internet Software Engineer
> > E-mail: [EMAIL PROTECTED]
> > Address: Progress Software Corporation, 14 Oak Park, Bedford, MA 01730
> > http://www.progress.com/
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> --
> David Mossakowski        [EMAIL PROTECTED]
> http://www.dwdog.com/styk      212.310.7275
>
> "I don't sit idly by, I'm planning a big surprise"
> F         U         G         A        Z        I
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to