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
The code in a finally clause will never fail to execute, right?
What is the use of send redirect () method?
What are the life cycle methods of the servlet?
How servlets are deployed in java?
What's the difference between authentication and authorization?
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code
Define the servlet mapping.
Explain mvc pattern.
What is servlet lazy loading?
Is servlet synchronized?
What are the differences between forward() method and sendredirect() methods?
What is httpservlet class?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
How does tomcat servlet container work?