当前位置: 代码迷 >> Web前端 >> weblogic跟tomcat获得servletContext的一些差别
  详细解决方案

weblogic跟tomcat获得servletContext的一些差别

热度:86   发布时间:2012-07-01 13:15:00.0
weblogic和tomcat获得servletContext的一些差别
由于weblogic的javax.servlet.XXX.jar跟tomcat提供的servlet-api.jar文件有些差别
所以在获得servletContext的时候,方式有点不同

weblogic: session.getServletContext()

tomcat: request.getServletContext()

SpringMVC & DWR:
WebContextFactory.get().getSession()
WebContextFactory.get().getSessionContext()
WebContextFactory.get().getRequest()
WebContextFactory.get().getServletContext()

http://panyongzheng.iteye.com/admin/blogs/1263411