There is no limit on the session memory or capacity.
It totally depends on the JVM Heap Memory.
It depends on the RAM of your server infrastructure.
Even if the RAM is not enough, the Virtual memory concept is there...
So you can put any amount of data inside a session, but burdening session will significantly cause performance issues.
Just implement log4j as it is the good one. Download the jar or add its details in maven. in log4j.xml or .properties file add configuration .
The default session timeout for J2EE web applications is 30 minutes. This value is specified in the web.xml file of your web application.
<!-- ==================== Default Session Configuration ================= -->
<!-- You can set the default session timeout (in minutes) for all newly -->
<!-- created sessions by modifying the value below. -->
We can also set the session timeout values programmatically. In that case we will override the default value which is specified in web.xml file.
You can provide a negative value here to indicate that the session never expires like this session.setMaxInactiveInterval(-1);
or session.setMaxInactiveInterval(36000); which is equals to 10*60*60
getMaxInactiveInterval(), getLastAccessedTime() can be used as per your requirement.
We have to observe that the tagged one is in minutes and this one which we are explicitly setting is in Seconds.
A persistent cookie is a data file (a small text file) capable of providing websites with user preferences, settings and information for future visits. Persistent cookies provide convenient and rapid access to familiar objects, which enhances the user experience (UX).
A persistent cookie is also known as a stored or permanent cookie.
Non-Persistent cookies are otherwise called as temporary cookies. They are active as long as the browser remains active or user session is active. They are also called as session based cookies. While Persistent cookies are permanent cookies. They are stored as a text file in the hard disk of the computer.
This tag specifies that the servlet should be loaded automatically when the web application is started.
The value is a single positive integer, which specifies the loading order. Servlets with lower values are loaded before servlets with higher values (ie: a servlet with a load-on-startup value of 1 or 5 is loaded before a servlet with a value of 10 or 20).
When loaded, the init() method of the servlet is called. Therefore this tag provides a good way to do the following:
Just use the URL Pattern inside welcome file list with out begining slash.
Ads By Google
© 2018 - JavaSpartans.com • All Rights Reserved