Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How we can check in particular page the session will be
alive or not

Answer Posted / ruchi

when we create session , we write
HttpSession session= res.getSessionn(true);
this checks whether there is a session bind on associated
request.if yes then it returns reference to session
object,otherwise create a session for associated request.

but if we want check that session is alive or not then we
write
HttpSession session= res.getSessionn(false);
this checks whether there is a session bind on associated
request.if yes then it returns reference to session
object,otherwise it returns null reference.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the servlet interface?

1082


Explain their methods? Tell me their parameter names also have you used threads in servlet?

1041


Is servlet a controller?

1007


Explain web application directory arrangement?

1064


How do you find out what client machine is making a request to your servlet

1059


Which are the different ways you can communicate between servlets?

998


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

1027


What are some advantages of storing session state in cookies?

1018


How do cookies work in servlets?

1047


Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com

2182


How printwriter is different from servletoutputstream?

1005


List out difference between a JavaBean from a Servlet?

1032


Differentiate between the get and post method

1053


What do you mean by annotations in servlet?

1060


What is called Session Tracking?

1186