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

What is preinitialization of a servlet?

680


Describe servlet?

656


What is the difference between servlet and filter?

622


What is the use of httpservletrequestwrapper?

687


What is the default http method in the servlet?

872






What are different Authentication options available in Servlets.

659


What is the purpose of requestdispatcher interface?

705


How does Cookies work in Servlets?

758


Why is http protocol called as a stateless protocol?

618


What are its drawbacks of cgi?

655


Why servlet is faster than jsp?

650


What are the jobs performed by servlets?

673


What is SingleThreadModel interface?

781


What are the life cycle methods of the servlet?

680


What is servlet instance?

617