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 are Servlets?
What is meant by Servlet? What are the parameters of service method?
How do we go with database connection and log4j integration in servlet?
Describe the phases of servlet lifecycle?
What are the steps involved in placing a servlet within a package?
What are the various ways of session supervision in servlets?
Can we use threads in Servlets?
Which protocol will be used by browser and servlet to communicate
When a client request is sent to the servlet container, how does the container choose which servlet to invoke?
Tell us something about servletcontext interface.
What do you mean by singlethreadmodel interface?
What is servlet container. how it works?
What is http servlet? Explain with the help of an example.
Difference between doget and dopost?
Can filter be used as request or response?