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
What if we pass negative value in load-on-startup?
What is the type of method for sending request from http server?
How servlet is created?
Can we override destroy method in servlet?
How many objects of a servlet is created?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
what is servlet chaining?
What are the functions of Servlet container?
Can you create a deadlock condition on a servlet?
What is servlet initializer?
How forward () method is different from send redirect () method?
What is the difference between Difference between doGet() and doPost()?
How do you invoke a servelt?
Which is better jsp or servlet?
What are the important functions of filters?