Sorry if I was not clear.  I am able to create other servlets and
compile them.  When I attempt to use the .*Attribute methods of the
HttpSession interface, the compiler (javac) threw the aforementioned
errors.  If I use the deprecated .*Value methods, no problem.  Also,
the compiler throws no warning about using deprecated methods...
Hmmmmm  Now that I write that out it makes me think that it is
finding a previous version of servlets.  I'll see what I can find but
if anyone else has any suggestions, I'm listening.


---- Begin Original Message ----

From: Kevin Mukhar <[EMAIL PROTECTED]>
Sent: Tue, 2 Jan 2001 12:16:29 -0700
To: [EMAIL PROTECTED]
Subject: Re: HttpSession & methods


Charles Talleyrand wrote:
>
> Hello,
> I have downloaded servlet-2_2b.zip and unpacked it
into /servlets  In
> my classpath I reference /servlets and I can compile servlets.  My
> problem is that it chokes on the following.
>
> HttpSession session = request.getSession(true);
> try
> {
>  session.setAttribute("name", "value");
> }
>
> It then complains that
> symbol  : method setAttribute  (java.lang.String,java.lang.String)
> location: interface javax.servlet.http.HttpSession
>  session.setAttribute("name", "value");
>
> Any suggestions on what I'm missing?
> (Tomcat 3.2.1, W2k WS, java v 1.3.0, servlet 2.2b)

What exactly is it complaining about? That there is no setAttribute
method? And who is complaining? The server? (Since you say you can
compile, it must be the server.) This sounds like the server is using
a 2.1 compliant servlet package. Check the classpath used by the
server.

K Mukhar


Tell all your friends about wowwowmail.zzn.com
____________________________________________________________
ZapZone Network brought to you by FortuneCity. http://www.fortunecity.com Get 100 
megabytes of free

___________________________________________________________________________
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