How variables can be accessed across the sessions?
Answers were Sorted based on User's Feedback
Answer / mohan
we have to set the variable in session object.like
session.setAttribute("somename",varible name);
and then we can get this variable where we want in this
session
session.getAttribute("somename");
| Is This Answer Correct ? | 2 Yes | 0 No |
Can we define constructor in Servlet class?
How do you get the ip address of the client in servlet?
Why doesn’t a servlet include main()?
Write a command to get actual path of a servlet to the server?
Why HttpServlet class is declared abstract?
How long do servlets last?
What is cookies in servlet with example?
How can the session in servlet can be destroyed?
Why is httpservlet declared abstract?
what is the difference between doGet() and doPost()?
how this statement works..? public void service(HttpServletRequest request,HttpServletResponse response)
how do you maintain sessions in servlets?