cas错误:org.jasig.cas.client.validation.TicketValidationException: No principal wa

cas错误:org.jasig.cas.client.validation.TicketValidationException: No principal was found in the response from the CAS server.

很多文章都写到jasig CAS实现单点登录,客户端配置~如新建WEB项目cas-web-client, 并加入依赖包:cas-client-core-3.2.1.jar,commons-logging-1.1.jar,在配置web.xml时

 <filter>

        < filter-name >CASFilter</ filter-name >
        < filter-class >org.jasig.cas.client.authentication.AuthenticationFilter</ filter-class >
         < init-param >
             < param-name >casServerLoginUrl</ param-name > <!-- Cas Server登录url-->
             < param-value >https://www.tomcat1.com:8443/cas/login</ param-value >
         </ init-param >
         < init-param > <!-- 配置当前web应用所在的web服务器域名url -->
             < param-name >serverName</ param-name >
             < param-value >http://www.tomcat2.com:8080</ param-value >
         </ init-param >
     </ filter >
     < filter-mapping >
         < filter-name >CASFilter</ filter-name >
         < url-pattern >/*</ url-pattern >
     </ filter-mapping >
     < filter >
         < filter-name >CasTicketFilter</ filter-name >
         < filter-class >
             org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</ filter-class >
         < init-param >
             < param-name >casServerUrlPrefix</ param-name >
             <param-value>https://www.tomcat1.com:8443/cas</param-value><===此处必须拿掉“/cas”
         </ init-param >
         < init-param >
             < param-name >serverName</ param-name >
             < param-value >http://www.tomcat2.com:8080</ param-value >
         </ init-param >
     </ filter >

哎,为何好多人都没遇到呢???最后还是

http://jasig.275507.n4.nabble.com/No-principal-was-found-in-the-response-from-the-CAS-server-td1011262.html把问题找出来....

猜你喜欢

转载自hao0111.iteye.com/blog/2135488