CAS不能自动登录业务系统

最近学习一个集成软件CAS,我按照网上的方法,成功部署好了服务器端,客户端也能跟服务器端通信,但是问题出在:
当我输入业务系统访问URL时,跳转到认证界面,然后输入用户名密码后,认证通过,问题出现了,认证通过后依然跳转到业务系统的登录页面,而不是业务系统成功登录后的页面,不知道为什么,是否需要我自己将认证后后的用户名密码传入业务系统,还是我哪个地方配置错误呢?
客户端配置:
编辑应用系统以及平台的配置文件
以平台为例,下载一个cas-client-3.1.10.zip包,解压后将cas-client-3.1.10/java/lib目录下的cas-client-core-3.1.10.jar这个包复制到/webapps/charisma/WEB-INF/lib 下,并编辑charisma/WEB-INF/web.xml文件,添加以下代码
<!-- CAS -->

<!-- 用于单点退出 -->
<listener>
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>

<filter>
<filter-name>CAS Single Sign Out Filter</filter-name> <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
</filter>

<!--用于字符过滤-->
<!--
  <filter>  
  <filter-name>encodingFilter</filter-name>  
  <filter-class>  
  org.springframework.web.filter.CharacterEncodingFilter  
  </filter-class>  
  <init-param>  
  <param-name>encoding</param-name>  
  <param-value>UTF-8</param-value>  
  </init-param>  
  <init-param>  
  <param-name>forceEncoding</param-name>  
  <param-value>true</param-value>  
  </init-param>  
  </filter>
-->

<!-- 用于单点登陆 -->
<filter>
    <filter-name>CAS Authentication Filter</filter-name> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
    <init-param>
      <param-name>casServerLoginUrl</param-name>     <param-value>https://localhost:8443/cas/login</param-value>
<!--这里的server是服务端的IP-->
    </init-param>
    <init-param>
      <param-name>renew</param-name>
<param-value>false</param-value>
    </init-param>
<init-param>
      <param-name>gateway</param-name>
<param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>serverName</param-name>      <param-value>http://localhost:8888</param-value>
    </init-param>
</filter>

<!--负责Ticket校验-->  

  <filter>
<filter-name>CAS Validation Filter</filter-name> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
  <param-value>https://localhost:8443/cas</param-value>
</init-param>
<init-param>
<param-name>serverName</param-name>
<param-value>http://localhost:8888</param-value>
</init-param>
<init-param>
<param-name>useSession</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>redirectAfterValidation</param-name>
<param-value>true</param-value>
</init-param>
  </filter>
   

  <filter>
  <filter-name>CAS HttpServletRequest WrapperFilter</filter-name> <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
  </filter>  

  <filter>
<filter-name>CAS Assertion Thread Local Filter</filter-name> <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
  </filter>

  <!--字符过滤-->
  <!--
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.htm</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.ftl</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.xhtml</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.html</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.shtml</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.jsp</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.do</url-pattern>  
  </filter-mapping>  
  <filter-mapping>  
  <filter-name>encodingFilter</filter-name>  
  <url-pattern>*.vm</url-pattern>  
  </filter-mapping>
-->

<!--单点登出-->

<filter-mapping>
<filter-name>CAS Single Sign Out Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!--单点登陆-->

<filter-mapping>
    <filter-name>CAS Authentication Filter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
  <filter-name>CAS Validation Filter</filter-name>
  <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
  <filter-name>CAS HttpServletRequest WrapperFilter</filter-name>
  <url-pattern>/*</url-pattern> 
  </filter-mapping>
  <filter-mapping>
<filter-name>CAS Assertion Thread Local Filter</filter-name>
  <url-pattern>/*</url-pattern>
  </filter-mapping>

  <!-- END CAS -->这里面的IP最好是用域名,以免发生不必要的异常。
现在打开http://localhost:8080/webapp/,浏览器会弹出安全提示,接受后即转到 CAS 的登录页面,填入前面我在数据库里面设定的用户名和密码,页面就转到webapp/login.jsp了。而不是main.jsp。(main.jsp是业务系统成功登录后的页面)

你可能感兴趣的:(thread,Web,应用服务器,jsp,浏览器)