webwork+spring+hibernate
在com.xxx.service.impl中
加入
import javax.servlet.http.HttpSession;
import org.directwebremoting.WebContextFactory;
程序中
//获取当前session
HttpSession session = WebContextFactory.get().getSession();
//获取session中的属性
session.getAttribute("USER");
return ((PubUsers) session.getAttribute("USER")).getCorporationId();
在com.xxx.service.impl中
加入
import javax.servlet.http.HttpSession;
import org.directwebremoting.WebContextFactory;
程序中
//获取当前session
HttpSession session = WebContextFactory.get().getSession();
//获取session中的属性
session.getAttribute("USER");
return ((PubUsers) session.getAttribute("USER")).getCorporationId();