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
Which is the methods of generated servlet?
What are the types of an http request?
What is session tracking?
Why do we have servlet wrapper classes?
What is Servlets and explain the advantages of Servlet life cycle?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
What is the use of servletconfig interface?
What do you mean by request dispatcher in servlet? Also explain its methods.
What are the types of protocols supported by httpservlet ?
Whats the advantages using servlets over using CGI?
What is the difference between 2 types of servlets?
What is SingleThreadModel interface?
What is the difference between get and post methods?
What do you mean by httpservlet and how it is different from the genericservlet?
How can you start a jta transaction from a servlet deployed on jboss?