Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

session problem

Thread view: 
gk - 21 Mar 2006 10:01 GMT
http://getahead.ltd.uk/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContext.html

we have these 2 definition in that page...

(1)

javax.servlet.http.HttpSession     getSession()
         Returns the current session associated with this request, or
if the request does not have a session, creates one.

(2)
javax.servlet.http.HttpSession     getSession(boolean create)
         Returns the current HttpSession associated with this request
or, if there is no current session and create is true, returns a new
session.

whats the difference between (1) and (2) ?  i see, the different states
"current sesion"....can anybody explain this stuff to understand the
difference .

which one i should use ?
Sanjay - 21 Mar 2006 13:33 GMT
> http://getahead.ltd.uk/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContext.html
>
[quoted text clipped - 11 lines]
> or, if there is no current session and create is true, returns a new
> session.

All I can see is with this API, you have the handle not to create a
session if it doesnt exist.

> whats the difference between (1) and (2) ?  i see, the different states
> "current sesion"....can anybody explain this stuff to understand the
> difference .
>
> which one i should use ?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.