aspose file tools*
The moose likes Servlets and the fly likes getSession Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "getSession" Watch "getSession" New topic
Author

getSession

ahamed irshad
Ranch Hand

Joined: Feb 26, 2010
Posts: 31

can anyone explain me request.getSession() with a simple example?thanks in advance


You can do anything, but not everything
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What specifically don't you understand? And what would an example look like other than setting a reference to it?
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Lets go:
with

you get a new session if doesnt exists.

If you do

if the session doesn't exist it wont creat one.

You can use session to store objects to navigate beetwen the requests. Like an user attribute.

C ya


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
 
 
subject: getSession