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 do you mean by url pattern in servlet?
What is the difference between 2 types of servlets?
Who is responsible for writing a constructor?
What is session?
What are Servlets?
What is dispatcher servlet?
What are the new features added to servlet 2.5?
Explain servlet events?
What is servlet in simple terms?
Why do we need servlet filter?
How a servlet is unloaded?
Explain in brief the directory structure of a web application?
What is a servlet context object?
How to find whether a parameter exists in the request object?
What are the mechanisms used by a servlet container for maintaining session information?