Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet how to make session timeout programatically
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


navi
how to make session timeout programatically
1 Answer(s)      5 years and 8 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

April 14, 2009 at 4:07 PM


Hi Friend,

If you want to make session timeout programatically, you can use the method setMaxInactiveInterval() method of interface HTTPSession that sets the maximum time in seconds before a session becomes invalid. Its syntax is:
session.setMaxInactiveInterval(int interval);

And if you want to specify the timeout of a session in the deployment descriptor of your web application (web.xml)then do the following:

<web-app>
<session-config>
<session-timeout>10</session-timeout>
</session-config>

</web-app>

Here time is expressed in minutes.

Thanks


Related Tutorials/Questions & Answers:
how to make session timeout programatically - JSP-Servlet
how to make session timeout programatically  hi, i have a login page with username and password. how to make session timeout for 10minutes... to make session timeout programatically, you can use the method
Session Timeout
increased the application timeout value to 120(i.e 2 hours), and reastarted the server. But, the session timeout is not happening for 120 mins...Session Timeout  Hi, we are using JBoss 4.0.2 I have edited
Advertisements
How to use filter to redirect to login page after session timeout.
How to use filter to redirect to login page after session timeout.  hello Sir, I have to make a web application in which i have to give session timeout . means if screen is inactive for a particular period of time
How to use filter to redirect to login page after session timeout.
How to use filter to redirect to login page after session timeout.  hello Sir, I have to make a web application in which i have to give session timeout . means if screen is inactive for a particular period of time
php session timeout
php session timeout  How to check if the session is out or timeout have occurred in the PHP application
session timeout - Security
session timeout  How to change session timeout using java programming i do not want to change timeout in web.xml.  Hi friend, Code...; Session session = null; session = new Session (theuser
How to use filter to redirect to login page after session timeout
How to use filter to redirect to login page after session timeout  hello Sir, I have to make a web application in which i have to give session timeout . means if screen is inactive for a particular period of time
Session timeout message need to be displayed - Java Beginners
Session timeout message need to be displayed  Hi, I want to display a session timeout on website. i want to find session - remaining time set in web.xml. Thanks Manu
How to threow timeout exception when DB is not responding
How to threow timeout exception when DB is not responding  How to throw timeout exception when DB is not responding
How to threow timeout exception when DB is not responding
How to threow timeout exception when DB is not responding  How to throw timeout exception when DB is not responding
How to make session control using only JSP programming language
How to make session control using only JSP programming language  Could i do Controlling session using only JSP programming language without using anylanguage
how can i make a session invalidate in java when browser is closed
how can i make a session invalidate in java when browser is closed   how can i make a session invalidate in java when browser is closed   ... to make the session invalid when browser/tab is closed like gmail. Thanks
How to provide timeout condition in my project
How to provide timeout condition in my project  Hi I am doing online examination system project i want 2 set time for my exam after that system shuld declare timeout how to provide that plz
how to make session valid even browser has closed - Java Interview Questions
how to make session valid even browser has closed  Hi, I have doubt that session will close when we close the web browser. My doubt is, even when I close the browser my session should not close or delete. How can I do
How To Turn On the Session Support?
How To Turn On the Session Support?  How To Turn On the Session Support
how to create session for login
how to create session for login  how to create session for login? how to display uploaded resume and images in the profile
How to make elements invisible ?
How to make elements invisible ?   How to make elements invisible
how to make this pattern???
how to make this pattern???  how to make following pattern in javascript
how make ID - Ajax
how make ID  how make a ID in eyeball chat
How to destory session in PHP
How to destory session in PHP  Hi, I have to write a php page for logout. Please tell me what i should write? Thanks   Hi, You can use following code for logout: <? session_start(); session_destroy(); header
session management
session management  hello, I m doing project completly jsp's .In that jsp only coding and designing,now i m getting a problem that when session timeout some sql statements should execute like to make logout status to true.so
JSp session time out
for it??   If you want to make session timeout programatically, you can use... the timeout of a session in the deployment descriptor of your web application...JSp session time out  Consider a case where we are working on a java
how to make exampage in jsp ?
how to make exampage in jsp ?  how to make a online exam page in jsp and servelet
how to make multiple choice questions
how to make multiple choice questions  I have to make a multiple choice choice using JSP/Servlets. I created a a session bean for the questions and answers. how to associate group of questions to a user? so each user will have
how to make a program on array
how to make a program on array  When you make a program on array that the element will move downward and upward and when you input twice 0 then thats the time that it will not move. pls. give me a formula...tnx
How to make selectOneMenu scrollable
How to make selectOneMenu scrollable  how to make the selectOneMenu scrollable? I have around 20 values in drop down and i want the scrollable functionality after 5 values. Kindly reply as soon as possible. Thanks Shikha
How to use session in struts 1.3
How to use session in struts 1.3  i want to know how to use session in Struts specially in logIn authentication
how make excel
how make excel  how make excel spreadsheet IN JAVA. please send this code argently   Hello Friend, Try the following code: import java.io.*; import org.apache.poi.hssf.usermodel.HSSFSheet; import
how to make multiple rectangles
how to make multiple rectangles  I,m a beginner , m sorry if the question is really simple i have an array list.I want to print the contents...(JFrame.EXIT_ON_CLOSE); //Set JFrame size setSize(400,400); //Make JFrame
how to make paging with function ?
how to make paging with function ?  how to make paging with function ?   //this page is display.php <?php</p> $con=mysql_connect("localhost","root",""); if(!$con) { die("you can connect please check". mysql
how to make a label left alignment?
how to make a label left alignment?  how to make a label left alignment
Advertisements
 

 

 

DMCA.com