Just define the variable first.
HttpSession Session;

then use it.

> -----Original Message-----
> From: drew w [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 3:46 PM
> To: [EMAIL PROTECTED]
> Subject: Sessions in Servlets
>
>
> I can access sessions in JSP. But I can't seem to write or
> read them in my
> servlet. Is this possible. Here is the code:
>
> session.setAttribute( "blnIsLoggedIn", true );
>
> Error:
> Undefined variable or class name.
>
> I am importing:
> import java.io.*;
> import java.util.*;
> import javax.servlet.*;
>
> I also tried import javax.servlet.http.HttpServlet; and I get the same
> error. Am I missing an import?
>
> thanks,
> andrew
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to