How variables can be accessed across the sessions?

Answer Posted / mohan

we have to set the variable in session object.like
session.setAttribute("somename",varible name);
and then we can get this variable where we want in this
session
session.getAttribute("somename");

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we have servlet filters?

779


What are the different methods involved in generic servlet?

802


What is a deployment descriptor?

836


What is the use of attribute in servlets?

766


What are different Authentication options available in Servlets.

779


How the servlet is loaded?

789


Describe in brief RequestDespatcher?

821


Write a simple servlet program to print the contents of html.

775


What is servlet and its types?

770


Explain the features are in servlet 3?

799


What is preinitialization of a servlet?

773


Can you use javascript in servlets?

801


Explain the lifecycle of a servlet?

709


Can we get PrintWriter and ServletOutputStream both in a servlet?

890


What is the purpose of dispatcherservlet properties?

709