In this post i will explain the easy process to disable session creation in the JSP pages. Disabling the session in some pages will improve the performance of your web application in JSP. Every time a JSP is requested, JSP creates Associate in Nursing HttpSession object to take care of state for every distinctive shopper. The session information is accessible within the JSP because the implicit session object. In JSPs, sessions area unit enabled by default.
Session object uses the server resources. every session object uses up atiny low quantity of system resources because it is keep on the server aspect. This conjointly will increase the traffic because the session ID is distributed from server to shopper. shopper conjointly sends identical session ID along side every request. If a number of the JSP pages on your data processor have gotten thousands of hits from web browser and there’s not have to be compelled to determine the user, thus its higher to disable the session there in JSP page.
Below code will set your session attribute of the page directive to false, as shown in the following example:
<%@ page language="java" session="false"%>
You current Session is Disabled for this page