Re: Help with Java servlet : getServletContext().



In article <1114785464.432939.282130@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, vmswar2
@yahoo.com enlightened us with...
> I am newbie to Java, am trying to get a program working, and I have
> imported the java packages below along with many other imports :
> import javax.servlet.GenericServlet;
> ....
> xsltFile = new File(getServletContext().

What are you getting the servletContext FROM? ;)

someServlet.getServletContext()

Probably, depending on where this statement is running from, you want
this.getServletContext()

You can call a method on nothing.

HTH
--
--
~kaeli~
Practice safe eating - always use condiments.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

.



Relevant Pages

  • Re: Help with Java servlet : getServletContext().
    ... >> I am newbie to Java, am trying to get a program working, and I have ... >> imported the java packages below along with many other imports: ... instance variables (where you have a local variable of the same name, ...
    (comp.lang.java.help)
  • Re: Help with Java servlet : getServletContext().
    ... > imported the java packages below along with many other imports: ... > + template)); ... whole new type of servlet? ...
    (comp.lang.java.help)
  • Help with Java servlet : getServletContext().
    ... imported the java packages below along with many other imports: ... + template)); ...
    (comp.lang.java.help)
  • Re: A question about closing the SqlDataReader
    ... I am a newbie and using VB.Net. ... equivalent to Imports. ... I know read in the online help that it also can ... >using (SqlDataReader reader = cmd.ExecuteReader()) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: find the last row number
    ... Frank Kabel ... Newbie wrote: ... > I have some code that imports a text file into a template. ... > F-I there are some formulaes that I need to copy down to the last row ...
    (microsoft.public.excel.programming)