实现我的应用与JForum论坛的整合,使用单点登录

我在网上查找一些资料,我是这样实现的,我使用的是Struts2+hibernate+spring:
在一个Action中
public String login() throws Exception{

/*if (null == validateCode
|| !validateCode.equals(getSession().get("randomcode"))) { // 验证码验证失败

return "exception";
}*/
try{
User checkUser=userServiceImpl.checkUserLogin(user.getUserName(), user.getUserPass());
getSession().put("user", checkUser);
if(checkUser!=null){
Cookie cookie=new Cookie("cookie.name.user", checkUser.getUserName());
cookie.setMaxAge(-1);
cookie.setPath("/");
getResponse().addCookie(cookie);
return "login";
}
}catch(Exception ex){
ex.printStackTrace();
}
return "loginError";
}

然后修改Jforum论坛的里的SystemGlobals.properties 文件
#############################
# SSO / User authentication
#############################
# Authentication type: use one of the following options
#
# sso: SSO based authentication. The called class will be the one
# specified by the key "sso.implementation", which must be an implementation
# of net.jforum.sso.SSO
#
# default: Non-SSO authentication, which relies on the key 
# "login.authenticator" to validate users. For more information, please see
# net.jforum.sso.LoginAuthenticator and the default implementation.
authentication.type = sso




# The above key will be be used then "authentication.type" is set to "sso"
# The default implementation (used here) only checks if request.getRemoteUser()
# is not null. This may be enough for many situations.
sso.implementation = net.jforum.sso.CookieUserSSO

但是我测试了一下好像不行,那位高手弄个Jforum,指点一下。

作者: wwwhongxia   发布时间: 2011-06-15

没人回复啊,自己顶。

作者: wwwhongxia   发布时间: 2011-06-15

没人回复啊,自己顶。

作者: wwwhongxia   发布时间: 2011-06-15

没人回复啊,自己顶。

作者: wwwhongxia   发布时间: 2011-06-15