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 / vemula bojjanna
by using setAttribute()and getAttribute()
for example list is one variable in one servlet like
List l=new list();
l.add("bujji");
l.add("vemula");
u set this value from this servlet by using
req.setAtribute("list",l);
by using getAtribute() u can use the list value of first
servlet into second servlet like
req.getAtribut(list);
| Is This Answer Correct ? | 3 Yes | 14 No |
Post New Answer View All Answers
What is the directory structure of a war file?
What is the difference between using getSession(true) and getSession(false) methods?
What is the difference between jsp and servlet life cycle?
What is the
How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255
How is a servlet implemented in code?
What’s the difference between forward() and sendredirect() methods?
What is the major difference between context parameter and context attribute?
Write a command to get actual path of a servlet to the server?
What is new in ServletRequest interface ? (Servlet 2.4)
Differentiate between the get and post method
What are the objects involved when a servlet receives a call from client?
What is a deployment descriptor?
What's the architecture of a servlet package?
What are the steps that are involved in using the httpservlet class?