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
Which java application server is the best?
What is a servlet-to-servlet communcation?
What is the use of servlet wrapper classes?
What’s the difference between genericservlet and httpservlet?
What is a servlet context object?
What is difference between cookies and httpsession?
Define the life cycle of a servlets.
Can you call a jsp from the servlet?
Why is http protocol called as a stateless protocol?
What are different ways for authentication of servlet?
what is servlet chaining?
Can we fetch the attributes related to a servlet on a different servlet?
What is the use of attribute in servlets?
How to notify an object in session when session is invalidated or timed-out?
What is called Session Tracking?