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

What is difference between server and servlet?

809


Can you refresh servlet in client and server-side automatically?

810


What is a servlet context?

825


Is it good idea to create servlet constructor?

997


Explain the servlet context.

814


When servlet object is created?

815


Why filter is used in servlet?

741


What is the difference between the servlets and cgi programs?

741


Describe the phases of servlet lifecycle?

823


What is java servlet?

805


How to make sure a servlet is loaded at the application startup?

768


Is servlet thread safe?

748


Why HttpServlet class is declared abstract?

871


What is cgi?

785


What is api in servlet?

756