tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Sifuentes" <ben.sifuen...@intechpro.com>
Subject java.lang.NoSuchMethod
Date Fri, 26 Oct 2001 21:28:43 GMT
I'm getting a java.lang.NoSuchMethod error when executing the following:

    // Retrieve the context for this object
    HttpSession session = req.getSession();
    ServletContext context = session.getServletContext();


The error seems to be happening on the call to getServletContext()

The Class that this incures in is instantiated from a servlet and passed the
HttpServletRequest on the call to execute(...) method.

The Class is defined as so:
class MainCommand implements Command {
  private String next;

  public MainCommand(String next) {
    this.next = next;
  }

  public String execute(HttpServletRequest req)
    throws CommandException {

    // Retrieve the context for this object
    HttpSession session = req.getSession();
    ServletContext context = session.getServletContext();

    return next;
  }

}



Does any one have any clue why this would be happening? The call according
to the JDOC is valid.

-Ben


Mime
View raw message