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

What are the kinds of http requests?

791


Why are http servlets used in programming?

745


Who is responsible to create the object of servlet?

916


What are the various ways of session supervision in servlets?

747


what do you understand by url rewriting?

708


What is the life cycle of a servlet?

1101


What do you mean by annotations in servlet?

790


Explain url encoding in servlet?

799


When servlet object is created?

809


Explain the methods of request dispatcher in servlet?

726


How the typical servlet code look like ?

872


How do you communicate in between Applets and Servlets?

808


What is a cookie What is the difference between session and cookie

817


Explain jsessionid and when is it created?

792


What are the different methods of session management in servlets?

736