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 do you mean by interservlet communication?

576


Which method of the httpservletrequest object is used?

556


Define the life cycle of a servlets.

563


Can we fetch the attributes related to a servlet on a different servlet?

624


Why is servlet used?

675






What is servlet interface?

694


How the servlet is loaded?

590


What is URL Encoding?

612


What is servletconfig?

541


Explain the different ways for servlet authentication?

518


Which are the different ways you can communicate between servlets?

512


How can we implement a jsp page?

621


Explain the features are in servlet 3?

595


Should I override the service() method?

662


Explain request dispatcher and its methods.

576