Each web application contains a Session that can contain data that can be commonly made available to all the parts of the web application. The Session can be accessed from both the JSP and the Servlet.
Ex:
The servlet contains references to the HttpRequest object. So to access the session you can do so as below:
HttpSession session = request.getSession();