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...

Q : In session created by server with client(browser) How
can server find that request coming is belong to new
session OR belong to session that is timeout.

Answer Posted / rajib

import javax.servelet.*;
public MyServelet extends HttpServelet{
public void doGet(HttpServeletRequest
req,HttpServeletResponse res)throws ServletException,IO
Exception{
res.setContentType("text/html");
PrintWriter out=res.getPrintWriter();
out.println("for trac session0");
HttpSession sess=req.getSession();
if(sess==null){
out.println(Old session not exist );
}else{
HttpSession session=request.getSession(true);
out.println("new Session Created.");
}}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main tags in jsp?

889


what is the difference between jsp and servlets ?

986


How to connect jsp and java file?

984


Why is jsp used?

878


What is an expression language?

921


How many tags are provided in jstl?

1116


How does a jsp work?

878


What is jsp api?

941


How do I mix jsp and ssi #include?

987


How do I run a jsp file in linux?

963


How jsp is compiled?

871


What is the difference in using request.getrequestdispatcher() and context.getrequestdispatcher()?

1031


What is jspinit method?

974


Mention the implicit objects in a jsp.

984


Differentiate between response.sendredirect(url) and ?

1018