HttpServletRequest接口有一个RequstDispatcher
ServletContext接口有一个RequstDispatcher
不同的是HttpServletRequest可以用绝对与相对路径来表示,
而ServletContext只可以用绝对路径表示。
可以用request.getRequestDispatcher()得到HttpServletRequest接口的
可以用this.getServletContext().getRequestDispatcher()或者
ServletContext ctx=getServletContext();
方法得到ServletContext接口的
ServletContext接口有一个RequstDispatcher
不同的是HttpServletRequest可以用绝对与相对路径来表示,
而ServletContext只可以用绝对路径表示。
可以用request.getRequestDispatcher()得到HttpServletRequest接口的
可以用this.getServletContext().getRequestDispatcher()或者
ServletContext ctx=getServletContext();
方法得到ServletContext接口的
ServletContext ctx=getServletContext();
ctx.getRequestDispatcher();
方法得到ServletContext接口的刚刚少写了一句:P