摘要:
ServletContextServletContext从他的package信息可以看出,它是标准的JavaEE WebApplication类库javax.servlet.ServletContextServletContext提供了标准的Servlet运行环境,其实就是一些servlet和web container进行通信的方法public interface ServletContext { // Returns the URL prefix for the ServletContext. public String getServletContextName(); //Return.. 阅读全文
posted @ 2013-03-30 21:12
jack_ou
阅读(689)
评论(0)
推荐(0)
摘要:
1. ActionContext在Struts2开发中,除了将请求参数自动设置到Action的字段中,我们往往也需要在Action里直接获取请求(Request)或会话(Session)的一些信息,甚至需要直接对JavaServlet Http的请求(HttpServletRequest),响应(HttpServletResponse)操作. 我们需要在Action中取得request请求参数"username"的值:ActionContext context = ActionContext.getContext(); Map params = context.getPar 阅读全文
posted @ 2013-03-30 20:57
jack_ou
阅读(4302)
评论(0)
推荐(0)

浙公网安备 33010602011771号