DWR 从session中取出数据
需要导入的类有:
import org.directwebremoting.WebContextFactory;
?
import javax.servlet.http.*;
import javax.servlet.*;
?
import org.directwebremoting.WebContextFactory;import javax.servlet.http.*;import javax.servlet.*;try { HttpSession session = WebContextFactory.get().getSession();Customer c = (Customer) session.getAttribute(com.core.configuration.Configuration.SESSION_CUSTOMER); log.info("ssss" + c.getName());ServletContext application = session.getServletContext();} catch (Exception e) { e.printStackTrace();}?