session-timeout

How do I execute an authenticated AJAX request without resetting the tomcat's session timeout?

北城余情 提交于 2019-12-18 04:48:12
问题 I've got an existing Grails Web application that is in production and has a 30 minute session timeout. We are running Tomcat (tcServer). When a user is authenticated and on certain pages I want to make some periodic polling ajax requests to the server that do not extend this 30 minute session timeout - so that our session timeout isn't thwarted. The question is similar to this unanswered asp.net question, but none of the answers there will do and this in the Java/Tomcat realm. How do I

recognizing session timeout [duplicate]

北城余情 提交于 2019-12-18 03:01:10
问题 This question already has an answer here : How to call a method before the session object is destroyed? (1 answer) Closed 3 years ago . I am building a java web board game using servlets. I need to know when a user is not answering for 30 secundes, I am using session.setMaxInactiveInterval(30); But I need to know on the server side once the time ended so I can make this player quite. As it is now once the player return and try to do something he will get the timeout and I can see on on the

recognizing session timeout [duplicate]

一个人想着一个人 提交于 2019-12-18 02:59:18
问题 This question already has an answer here : How to call a method before the session object is destroyed? (1 answer) Closed 3 years ago . I am building a java web board game using servlets. I need to know when a user is not answering for 30 secundes, I am using session.setMaxInactiveInterval(30); But I need to know on the server side once the time ended so I can make this player quite. As it is now once the player return and try to do something he will get the timeout and I can see on on the

Session_End in Global.asax.cs not firing using forms authentication

跟風遠走 提交于 2019-12-17 20:57:10
问题 I have an asp.net 4.0 application that is using forms authentication set to a timeout at 45 minutes. I would like to redirect the user to a timeout page when the session has expired. Can anyone tell me how to do this? I am running .net 4.0. web.config has: <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx" protection="All" timeout="45" requireSSL="false"> </forms> </authentication> Global.asax.cs file has: void Session_End(object sender,

Redirect to login page after session timeout

本小妞迷上赌 提交于 2019-12-17 19:04:47
问题 I have found some similar questions but none gave me what I really need. Here is the thing, I have added this to my web.config to handle user session expiration: <sessionState mode="InProc" timeout="1" /> After 1 minute, the Session_End event from Global.asax is raised: Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) Response.Redirect("Login.aspx") End Sub This doesn't work, because: Response is not available in this context. (By the way, this question got an anwswer telling

How to differentiate between logout and session expired?

旧街凉风 提交于 2019-12-17 18:10:39
问题 Case 1: Log out : Once we log out, if one tries to access previous, it must automatically redirect to login.jsp Case 2: Session expired : If session expires when user is still logged in, it must try to automatically redirect to sessionExpired.jsp when previous page is accessed. How to differentiate ? I am currently invalidating session when logging out. 回答1: On login, set a cookie with a long expiry (> 24 hours). Remove this cookie at logout time by setting the maxage to 0. You can have check

Default session timeout for Apache Tomcat applications

Deadly 提交于 2019-12-17 17:29:56
问题 What is the default session timeout for web applications deployed on Tomcat5.5? Is it browser specific? In my web application, default timeout is mentioned neither in web.xml nor in code. 回答1: Open $CATALINA_BASE/conf/web.xml and find this <!-- ==================== Default Session Configuration ================= --> <!-- You can set the default session timeout (in minutes) for all newly --> <!-- created sessions by modifying the value below. --> <session-config> <session-timeout>30</session

Redirect to specific page after session expires (MVC4)

ⅰ亾dé卋堺 提交于 2019-12-17 15:46:15
问题 C# MVC4 project: I want to redirect to a specific page when the session expires. After some research, I added the following code to the Global.asax in my project: protected void Session_End(object sender, EventArgs e) { Response.Redirect("Home/Index"); } When the session expires, it throws an exception at the line Response.Redirect("Home/Index"); saying The response is not available in this context What's wrong here? 回答1: The easiest way in MVC is that In case of Session Expire, in every

How to empty/destroy a session in rails?

痞子三分冷 提交于 2019-12-17 10:17:47
问题 I can't seem to find it anywhere... How do I delete/destroy/reset/empty/clear a user's session in Rails? Not just one value but the whole thing.. 回答1: To clear the whole thing use the reset_session method in a controller. reset_session Here's the documentation on this method: http://api.rubyonrails.org/classes/ActionController/Base.html#M000668 Resets the session by clearing out all the objects stored within and initializing a new session object. Good luck! 回答2: session in rails is a hash

How to detect page is not in use for more 10 min?

落花浮王杯 提交于 2019-12-13 20:55:28
问题 I want to set session as unlimitted by refreshing page every 10mins. So i have to know page is using or not using right now ? My refreshing code is working fine: string _CurUrl = Request.RawUrl.ToString(); Response.AppendHeader("Refresh", "600; URL=" + _CurUrl + ""); 回答1: There are various jQuery plugins for detecting if a user is idle. jQuery idleTimer plugin - Paul Irish (Code on GitHub) jQuery Idle Timeout Plugin - Eric Hynds (Code on GitHub) Auto Timeout Plugin - Philip Almieri (Code on