//取得webapp上下文对象
org.directwebremoting.WebContextweb=WebContextFactory.get();
//得到servlet中的request/response对象
javax.servlet.http.HttpServletRequestrequest=web.getHttpServletRequest();
javax.servlet.http.HttpServletResponseresponse=web.getHttpServletResponse();
记得把dwr.jar包加入buildpath中,才不会报编译出错的问题!
原地址http://blog.csdn.net/xuhaihua1990/article/details/7569731
原文链接:https://www.f2er.com/ajax/166859.html