within a servlet you can't invoke pageContext.include("xxx.jsp") since this object is unknown to servlets. While writing servlets you must invoke Dispatcher.include(ServletRequest,ServletResponse) in a dispatcher aquired with the invocation of ServletContext.getRequestDispatcher or ServletRequest.getRequestDispatcher!
Joined: Nov 07, 2002
Sorry, its not Dispatcher, it's RequestDispatcher, and you can get a RequestDispatcher by invocating ServletContext.getNamedDispatcher.
Joined: Jan 04, 2003
oh, sorry, it should be invoked in a JSP not a servlet. then can you tell me which one would be invoked first in a JSP: request.getRequestDispatcher("xxx.jsp").include(req, res) or pageContext.include("xxx.jsp") ?