tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: java.lang.NoSuchMethod
Date Sat, 27 Oct 2001 19:07:52 GMT


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



--
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