JSp session time out

Ads
 

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 in the middle. I would like to know what statement/keyword is responsible for it??

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??

Ads









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
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 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
ModuleNotFoundError: No module named 'django-time-out'
ModuleNotFoundError: No module named 'django-time-out'  Hi, My... named 'django-time-out' How to remove the ModuleNotFoundError: No module named 'django-time-out' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-time-out'
ModuleNotFoundError: No module named 'django-time-out'  Hi, My... named 'django-time-out' How to remove the ModuleNotFoundError: No module named 'django-time-out' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-time-out'
ModuleNotFoundError: No module named 'django-time-out'  Hi, My... named 'django-time-out' How to remove the ModuleNotFoundError: No module named 'django-time-out' error? Thanks   Hi, In your python
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
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
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
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
Session expire and back button in jsp and servlet .
Session expire and back button in jsp and servlet .  Hii Sir... to invalidate the session after a certain interval of time and after clicking logout button.Means that after session expiry time and logout action no one can access
how to set time in jsp page
how to set time in jsp page   I need code for set the time in jsp code .iam using struts frame work back end oracle 10g ide is eclipse 6.0
Session In JSP
Session In JSP      ... of World Wide Web (WWW).    Session Management in JSP...; Cookies in JSP When cookie based session management is used, a token
JSP handle run-time exceptions
JSP handle run-time exceptions  How does JSP handle run-time... to have uncaught run-time exceptions automatically forwarded to an error processing... the browser to the JSP page error.jsp if an uncaught exception is encountered during
JSP parameter passing throught out web app
JSP parameter passing throught out web app  i want to pass one param from page1.jsp page to page4.jsp page but in between this i need to navigate page3.jsp and page2.jsp.Please help me to understand how could i transfer param
session value not get in many jsp page.
session value not get in many jsp page.  I am using servlet to set session by following code :- HttpSession session=request.getSession(false...,response); and get session value on jsp page by follwing:- String user=(String
session maintaining after logged in in jsp
session maintaining after logged in in jsp  Hi. I have created a login page. after the user logged in successfully if the user gives refresh the the control goes to the website home page. i want to retain in the same page
How to Get The Data from Excel sheet into out jsp page???
How to Get The Data from Excel sheet into out jsp page???  How to Get The Data from excel sheet to out jsp page in webApp
Preventing the creation of a Session in a Jsp Page
Preventing the creation of a Session in a Jsp Page          In jsp we have been provided the implicit session object. In jsp the session
jsp code for storing login and logout time to an account
jsp code for storing login and logout time to an account  I need simple jsp code for extracting and storing login and logout time in a database table...://www.roseindia.net/jsp/loginstatus.shtml
problem at the time of execution - JSP-Servlet
problem at the time of execution  when i was running web applications the exception i.e 404 resource is not available what it means and where it occures what is the solution   Hi Friend, This error occurs when
session
session   explain sessioln tracking in jsp and display program
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
Remove attribute in user defined session - JSP-Servlet
Remove attribute in user defined session  Hi, How we can set remove attribute for user defined session. I am appreciating if you are sending solution as soon as possible? Thanks, Sanat Kumar
how to use one form out of multiple form from one jsp to another jsp
how to use one form out of multiple form from one jsp to another jsp  ... a .jsp( say abc.jsp) file which contains multiple Action form.I am required to add one form from abc.jsp as it is to another .jsp(say def.jsp).Your advise
session realtime usage program simple jsp program or servlet ,which understands me importance of session
session realtime usage program simple jsp program or servlet ,which understands me importance of session  I knew importance of session theoritically like client state storage scope.,but jsp or servlet realtime simple session
calculate difference between two time in jsp
calculate difference between two time in jsp  How to calculate difference between two dates
can pass list of n values in session and get in jsp
can pass list of n values in session and get in jsp  In dao: am... In servlet: list=userBean.selectUserBo(); HttpSession session = request.getSession(true); session.setAttribute("currentUser",list); In jsp: <
can pass list of n values in session and get in jsp
can pass list of n values in session and get in jsp  In dao: am... In servlet: list=userBean.selectUserBo(); HttpSession session = request.getSession(true); session.setAttribute("currentUser",list); In jsp: <
Session
subsequent HTTP requests. There is only one session object available to your PHP scripts at any time. Data saved to the session by a script can be retrieved...Session  What Is a Session?   Hi friends, A session

Ads