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 servlet is created?
If some new data has entered the database, explain how can a servlet refresh automatically?
What is http servlet?
Explain load on start-up and its importance?
Define the life cycle of a servlets.
Why is Servlet so popular?
When Servlet is unloaded?
How can we achieve transport layer security for our web application?
What is the use of httpservletresponsewrapper?
What are common tasks performed by Servlet Container?
How do I support both get and post from the same servlet?
What do you mean by servlet?
What is servlet container. how it works?
What are the types of Session Tracking ?
What is difference between cookies and httpsession?