DWR框架中WebContext与WebContextFactory类

来源:互联网 发布:淘宝卖家如何设置佣金 编辑:程序博客网 时间:2024/06/07 14:24

org.directwebremoting Interface WebContext


这个接口对应的方法简单介绍如下:

java.lang.StringforwardToString(java.lang.String url)请求转发到一个给定的URL;

java.lang.StringgetCurrentPage()获取当前页面的URL

javax.servlet.http.HttpServletResponsegetHttpServletRequest()获取HttpServletResponse对象

javax.servlet.http.HttpServletResponsegetHttpServletResponse() 获取HttpServletResponse对象

ScriptSessiongetScriptSession() 获得ScriptSession对象

javax.servlet.http.HttpSessiongetSession() 获得HttpSession对象

javax.servlet.http.HttpSessiongetSession(boolean create) 返回与此请求或相关的当前的HttpSession如果没有当前会话和创造是真实的返回一个新的会话


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

org.directwebremoting Class WebContextFactory

static voidattach(Container container)内部的方法,使我们得到webcontextbuilder从而得到WebContext对象

static WebContextget() 当前WebContext访问

0 0
原创粉丝点击