How to pass session values from one servlet container to another servlet container? or how can we get session values of one container in another container?

Answer Posted / mohit rana

It's simple just use session (session object).
HttpSession session = request.getSession();
session.setAttribute(String obj);
and get the above value on other container
session.getAttribute(String obj);

Is This Answer Correct ?    16 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between jsp and servlet?

592


Explain the working of service() method of a servlet.

506


What is the dispatcher servlet?

516


What do you mean by cgi in servlet?

631


What is the disadvantage of cookies?

580






What are the phases of the servlet life cycle?

609


How do cookies work in servlets?

581


What is the use of httpservletresponsewrapper?

534


What is difference between jsp and servlet?

646


Which are the different ways you can communicate between servlets?

526


How we can create war file in servlet?

663


How to find whether a parameter exists in the request object?

668


What is the major difference between servlet and applet?

540


What is the difference between servlet and jsp?

600


What is cgi?

598