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


Please Help Members By Posting Answers For Below Questions

Which java application server is the best?

545


What is a servlet-to-servlet communcation?

644


What is the use of servlet wrapper classes?

666


What’s the difference between genericservlet and httpservlet?

526


What is a servlet context object?

617






What is difference between cookies and httpsession?

544


Define the life cycle of a servlets.

570


Can you call a jsp from the servlet?

546


Why is http protocol called as a stateless protocol?

535


What are different ways for authentication of servlet?

525


what is servlet chaining?

621


Can we fetch the attributes related to a servlet on a different servlet?

628


What is the use of attribute in servlets?

540


How to notify an object in session when session is invalidated or timed-out?

628


What is called Session Tracking?

596