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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


abhinav shaurya
JSp session time out
2 Answer(s)      2 years ago
Posted in : JSP-Interview Questions


Consider a case where we are working on a java application.After few hours of continuous work ,my application gets logged out in the middle. I would like to know what statement/keyword is responsible for it??


Advertisement
View Answers

September 14, 2012 at 1:29 PM


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.



September 14, 2012 at 9:10 PM


I got ur point.,but that happens only if u have left the applcation idle for some time,but i would like to knw like when we are working on an application for some time then suddenly it gets logged out in the middle i.e during our work....why is it so??



Related Tutorials/Questions & Answers:
JSp session time out
JSp session time out  Consider a case where we are working on a java application.After few hours of continuous work ,my application gets logged out... the maximum time in seconds before a session becomes invalid. Its syntax
Session time
Session time   I need to develop an application has a user id and password to login and maintain the session for 8 minutes. All the pages under the login are not available if there is no activity for 8 minutes
Advertisements
jsp - session - JSP-Servlet
JSP - Session  How to manage session in JSP
JSP Out Object
JSP Out Object  JSP Out Object?   out object denotes... of the object out is jsp.JspWriter. The out object "Javax.servlet.jsp.JspWriter". Methods of out Object: clear() clearBuffer() flush() isAutoFlush() getBufferSize
JSP Session Parameter rewrite
to set the time out for each session. removeAttribute() method is used... JSP Session Parameter rewrite   ... in jsp. JSP session provides methods like getCreationtime(), getLastAccessedTime
Session Last Accessed Time Example
Session Last Accessed Time Example      ... of session  and last access time of session. Sessions are used to maintain state...() method is used to find  the time when session was created
JSP Session Object
JSP Session Object  JSP Session Object?   Session Object denotes the data associated with a specific session of user. The class or the interface name of the object session is http.HttpSession. The object session
Session removing - JSP-Servlet
Session removing  Hi, I am destroying session by using session.invalidate() in JSP but I am not able to destroy it completely can anyone help me... has been in session using session. setAttribute() but at log off I am using
Session Timeour - JSP-Servlet
Session Timeour  Hi, How to create a session timeout page in JSP? Session timeout should happen after 15 mins of idle instance. Thanks ... the following link: http://www.roseindia.net/jsp/jsp-session-parameter
session concept - JSP-Servlet
session concept  Hello friends, How can we track unexpectedly closing a window when a jsp project running with session concept. And this tracking should update the log in status in data base
session in jsp - Java Beginners
let me know how to create a session in jsp. Session for jsp with two side...   Hi friend, session is implicit object in jsp. using session oject in jsp. first u set using following methods String name
session maintainence - JSP-Servlet
session maintainence  if the logout link is clicked in the main page it should display the message sucessfully logged out in the same page itself.... login application in jsp function validateForm(theForm
session in jsp
session in jsp In this section you will learn about session in JSP. Here you will learn about how to use the HttpSession in JSP. session in JSP is defined... the time of the session when it was created. getId() : This method is used
session tracking in jsp
session tracking in jsp  hi... i am creating 3 jsp pages ie. login.jsp,display.jsp,userinput.jsp.. i am able to pass the value from login.jsp to display.jsp using session set attribut ang get attribute.. but same ting
Session concept - JSP-Servlet
Session concept  Hai friends, I am doing a jsp project with session concept. If one person is not accessing his logged window for more than 10 minutes it gets automatically log out.Anybody explain me the reason
servlet session - JSP-Servlet
the counter if new user logs on and decrement if session times out or user  Hi... on and decrement if session times out or user log offs.Thanks
Session Tracking JSP - JSP-Servlet
Session Tracking JSP  Respected sir/madam, I am R.Ragavendran.. I Immediately need a coding for session tracking in JSP. Actually when... and Logout time in the next page.. This is my requirement.. OUTPUT: UserID
Session Problem in JSP - JSP-Servlet
Session Problem in JSP  I have developed a online feedback form in JSP platform. I have created normal session in JSP page. It is running in my... then the session is not working. I have not used EJB. Please tell me how can I track session
Clearing session in jsp
Clearing session in jsp  i have developed a web appilcation using jsp and when user try to logout, session is not clearing even though i have used session.invalidate() and session.removeAttribute("username
What is the default session time in php and how can I change it?
What is the default session time in php and how can I change it?  What is the default session time in php and how can I change
Session
Session   How can we set the inactivity period on a per-session basis?   We can set the session time out programmatically by using the method setMaxInactiveInterval() of HttpSession
session tracking - JSP-Servlet
session tracking  hi, i m working on a real estate web site....which i have to submit as final year project. im having problem regarding session... it working...actually i want to know when a user log in or register and log out from
Login Authentication and session in JSP - JSP-Servlet
Login Authentication and session in JSP  Hi, I am creating an small application in JSP,in which i need to check user authentication and session on each JSP page.Also how do i make logout page. Can you help me
session - JSP-Servlet
redirect the session  how i can redirect the session in any child window
Disabling Session in JSP
Disabling Session in JSP  ...; In this tutorial you will learn how to disable session creation in the JSP pages. Disabling the session in some pages will improve the performance of your JSP
session - JSP-Servlet
session  How to manage session for a particular user ..using session management?  Answer:If you get id as a integer from mlid field then userid is set in your session.RegardsAmar  Answer:If you get id
session maintainence - JSP-Servlet
session maintainence  how to enable a link only if the form in previous page is clucked  please show me your code
session management - JSP-Servlet
session management  hi friends... hope u all dng fine. i am dng... think i am not using session management properly. and also in my web.xml file i said session timeout 1min. even it is also not working.wht to do :-( i will give
arraylist with session - JSP-Servlet
arraylist with session  hi how can an arraylist stored in session.. and also how will it access?? pls give me the details with sample code..   Hi friend, Code to solve the problem : Thanks
session - JSP-Servlet
session  please send me an example code for session tracking using... that the Web server can't easily remember previous transactions.In session tracking.... There are four types of Session Tracking 1.Session 2.Cookies 3.Url-rewriting
set cookieless session variables in jsp
set cookieless session variables in jsp  I want to know how to set cookieless session variables in jsp, because when I run my application multiple... that . So, please tell is it possible in jsp to use cookieless session variables
Advertisements
 

 

 

DMCA.com