How do you share session objects between servlets and JSP?
Sharing sessions between a servlet and a JSP page is straight forward. JSP makes it a little easy by creating a session object and making it availabe already. In a servlet you would have to do it yourself. This is how: //create a session if one is not created already now HttpSession session = request.getSession(true); //assign the session variable to a value. session.putValue(“variable”,”value”); in the jsp page this is how you get the session value: <% session.