CAS验证成功后不能跳转到登陆成功的主页面
现在部署了CAS,有一个应用,下载输入应用的URL可以正确跳转到CAS服务的登陆界面,登陆验证通过后页面却跳转到了应用的登陆界面,不能直接进入登陆成功的主页面!
应用的web.xml如下
CASFilter
org.jasig.cas.client.authentication.AuthenticationFilter
casServerLoginUrl
https://TP_1010000110011000:8443/cas/login
serverName
http://localhost:8080
CASFilter
/*
CASValidationFilter
org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter
casServerUrlPrefix
https://TP_1010000110011000:8443/cas
serverName
http://localhost:8080
CASValidationFilter
/*
CASHttpServletRequestWrapperFilter
org.jasig.cas.client.util.HttpServletRequestWrapperFilter
CASHttpServletRequestWrapperFilter
/*
AutoSetUserAdapterFilter
AutoSetUserAdapterFilter
com.cdt.cas.client.casClientFilter
AutoSetUserAdapterFilter
/*
casClientFilter的代码如下:
publicvoiddoFilter(ServletRequestservletRequest,ServletResponseservletResponse,
FilterChainchain)throwsIOException,ServletException{
DatestartTime=newDate();
System.out.println("CasClient开始时间"+startTime.getTime());
finalHttpServletRequestrequest=(HttpServletRequest)servletRequest;
finalHttpServletResponseresponse=(HttpServletResponse)servletResponse;
finalHttpSessionsession=request.getSession(false);
finalAssertionassertion=(Assertion)(session==null?request
.getAttribute(AbstractCasFilter.CONST_CAS_ASSERTION):session
.getAttribute(AbstractCasFilter.CONST_CAS_ASSERTION));
Stringusername=assertion==null?null:assertion.getPrincipal().getName();
//_const_cas_assertion_是CAS中存放登录用户名的session标志
Objectobject=request.getSession().getAttribute("_const_cas_assertion_");
Stringurl=request.getRequestURL().toString();
if(object!=null&&username!=null){
//存放用户类型
session.setAttribute("userType","2");
//设置cookie
Cookiecookie=newCookie("username",username);
intmaxAge=60*60*24*365;//cookie存活时间1年
cookie.setMaxAge(maxAge);
response.addCookie(cookie);
}
if(chain!=null){
chain.doFilter(request,response);
}
DateendTime=newDate();
System.out.println("CasClient结束时间"+endTime.getTime());
}
请教各位高手!这个到底怎么弄啊!现在一直跳转到登陆页面!没有进入到登陆成功的页面啊!
------解决思路----------------------
是不是跳转的url不正确或者新页面所在的项目没启动