Which is better approach among four(HttpSession,cookie,URL
Rewriting, Hidden Fields) Session Tracking technic's ? Why ?
Answer Posted / sridhar
Best Approaches are HttpSession and URL Rewriting.....
in HttpSession when client sends the request to the server first time session object will be created.
HttpSession ses=Request.getSession(true);//if session is not created a new session will be created and JsessionId is sent to the client.if session is already created existed Jsession Id send to the client.
HttpSession ses=Request.getSession(false);//if session is already created the Jsessionid will send to the client
if not it will not create Session object.
If browser doesn't support cookies the appln will not work properly.
So to avoid this problem We can use UrlRewriting........
Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
How do you define a servlet?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
What is the life-cycle of servlets?
What are the life cycle methods of the servlet?
What is servlet in web technology?
What are the difference between RMI and Servlets?
Write the code to get the server information in servlet.
Difference between forward() method and sendredirect() method ?
What are the annotations used in servlet 3?
explain the advantages of servlet life cycle?
Is servlet a server side scripting language?
Does servlet have main method?
What is called Session Tracking?
Which java application server is the best?
Is servlet thread safe?