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
Who is responsible to create the object of servlet?
What are Servlets?
Write a program to show the functionality of servlets.
What is the difference between get and post methods?
What is api in servlet?
Can we fetch the attributes related to a servlet on a different servlet?
How to get the server information in a servlet?
Why is servlet used?
What is a cookie What is the difference between session and cookie
What do you mean by cgi in servlet?
How can we achieve transport layer security for our web application?
What is session tracking?
Explain in brief the directory structure of a web application?
Can we override destroy method in servlet?
What is meant by session? Tell me something about httpsession class?