tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Regen <j...@Globeset.com>
Subject Re: Session Question: creation of a session
Date Thu, 10 Aug 2000 18:23:02 GMT


Lucas Ludvig wrote:

> HttpServletRequest.getSession()
> - Returns the current session associated with this request, or if the request
> does not have a session, creates one.
> HttpServletRequest.getSession(boolean)
> - Returns the current HttpSession associated with this request, or if if
> there is no current session and create is true, returns a new session.
>
> Is there any difference?

Yes. In the latter one, you can decide NOT to create a session if one does not
exist.
You can't NOT create a session in the first one.
;-)




Mime
View raw message