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
How can I send user authentication information while making URL Connection?
Which event is fired at the time of project deployment and undeployment?
What do you mean by httpservlet and how it is different from the genericservlet?
How many objects of a servlet is created?
Why doesn’t a servlet include main()? How does it work?
What are the types of an http request?
What is the default http method in the servlet?
How do you define a servlet?
What is the life cycle of a servlet?
Is servlet a controller?
How can you create a session in servlet?
What is httpservlet class?
What are the common methods that are included in the http servlet class?
What are session variable in servlets?
What are the jobs performed by servlets?