Hello!

use HttpServletRequest.getSession(true);

It create one if there is no any session,if there is one it will return it.

Jayakumar

>From: Massimiliano Bariola <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Method gone???
>Date: Wed, 8 Mar 2000 19:39:11 +0100
>
>Hello,
>
>I'm programming a servlet using HttpSessions; the API docs for
>HttpServletRequests show a getSession() method (with no parameters); but
>the
>compiler complains saying it is nonexistent. has it been removed or what?
>And if so, how do I implement the "if a session exists, keep it;
>otherwise create one" behavior?
>
>I'm totally puzzled, thanks for your help
>
>Massimiliano Bariola
>
>___________________________________________________________________________
>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

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

___________________________________________________________________________
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