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

How can I declare methods within my jsp page?

860


What is jstl?

884


How can we avoid direct access of jsp pages from client browser?

1075


What is jsp and its features?

885


What is jstl core tags?

823


How can I implement a thread-safe jsp page?

872


What is the requirement of a tag library?

853


Explain jsp and tell its uses?

902


What is scriptlet and what is expression?

860


How do I run a jsp file in linux?

924


What is use of scriptlet tags in jsp?

837


Why jsp is used in java?

823


What is application scope in jsp?

883


Is jsp better than servlet?

848


Java Server Page I can use a function in two ways: Either I declare or I declare <%@ page import = "mypack.mysubpack.MyClass" %> In each case I can call a function later by coding MyClass.myFunction(); So what is the difference between the two variantes? Why are Beans invented if we don't need them because we have the import statement ? please guide me its an humble request to you reader if u know n i'll be thankful to you...........

2100