tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <in...@mail.matav.hu>
Subject Re: java.lang.NoSuchMethod
Date Mon, 29 Oct 2001 01:33:20 GMT
On Sat, Oct 27, 2001 at 12:07:52PM -0700, Craig R. McClanahan wrote:
> 
> 
> On Sat, 27 Oct 2001, Incze Lajos wrote:
> 
> > Date: Sat, 27 Oct 2001 17:12:26 +0200
> > From: Incze Lajos <incze@mail.matav.hu>
> > Reply-To: Tomcat Developers Mailing List <tomcat-dev@jakarta.apache.org>
> > To: tomcat-dev@jakarta.apache.org
> > Subject: Re: java.lang.NoSuchMethod
> >
> > On Fri, Oct 26, 2001 at 05:28:43PM -0400, Ben Sifuentes wrote:
> > > 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();
> >
> > Ben,
> >
> > you're getting java.lang.NoSuchMethod exception when using
> > session.getServletContext(), because there is No Such Method
> > in HttpSession.
> >
> 
> That's only true in servlet 2.2 -- it was added in 2.3, so it will work
> under Tomcat 4 (as long as your class was compiled against the 2.3 version
> of servlet.jar).
> 
> >
> > incze
> >
> 
> Craig

Sorry Ben, I was wrong. Probably you compiled against a 2.3 servlet.jar then
dropped your app into a 2.2 servlet container.

incze

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message