Ajax page Refresh unresponsive at CAS single sign-on (302 moved temporarily)

Source: Internet
Author: User
Tags cas config valid tomcat

The recent use of CAs as a single point of authentication service found about 20 minutes later found that the general asynchronous way to refresh the page is no response (due to the use of the Easyui framework, page refresh is based on Ajax+div), has been considered a CAS service-side timeout problem, view the various configurations, Online also referred to a lot of posts, has not been resolved, today is not intended to remember is not the session expired, because the single sign-on client does not configure any session effective time long, That is, the client's session length is tomcat default length (on the Internet, it is said that tomcat default sessions valid for 30 minutes, and now found that about 20 minutes will appear with Ajax unresponsive, so the default 30 minutes to be confirmed by experiments), Open the project's Web.xml file (Java project), plus the bottom code:

<session-config>  
      <session-timeout>120</session-timeout>  
</session-config>

120 refers to 2 hours, the default unit is minutes, here 120 minutes is to be consistent with the CAS service side, the default identity of the CAS server is valid for 2 hours, the code is as follows:

<!--Ticketgrantingticketexpirationpolicy:default as 3.5-->
    <!--provides both idle and hard timeouts, F or instance 2 hour sliding window with an 8 hour max Lifetime--> <bean
    id= "Grantingticketexpirationpolicy" Clas s= "Org.jasig.cas.ticket.support.TicketGrantingTicketExpirationPolicy"
          p:maxtimetoliveinseconds= "${ tgt.maxtimetoliveinseconds:28800} "
          p:timetokillinseconds=" ${tgt.timetokillinseconds:7200} "/>

The configuration is in Web-inf/spring-configuration/ticketexpirationpolicies.xml and Timetokillinseconds is inactive for active time, in seconds.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/ajax/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.