/** * Returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path. * A RequestDispatcher object can be used to forward a request to the resource or to include the * resource in a response. The resource can be dynamic or static. * * The pathname specified may be relative, although it cannot extend outside the current servlet * context. If the path begins with a "/" it is interpreted as relative to the current context root. * This method returns null if the servlet container cannot return a RequestDispatcher. * * The difference between this method and ServletContext.getRequestDispatcher(java.lang.String) * is that this method can take a relative path. **/ public RequestDispatcher getRequestDispatcher( String path ) { try { if (!path.startsWith( "/" )) path = combinedPath( getServletPath(), path ); return _servletRequest.getServlet().getServletConfig().getServletContext().getRequestDispatcher( path ); } catch (ServletException e) { return null; } }
/** * Returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path. * A RequestDispatcher object can be used to forward a request to the resource or to include the * resource in a response. The resource can be dynamic or static. * * The pathname specified may be relative, although it cannot extend outside the current servlet * context. If the path begins with a "/" it is interpreted as relative to the current context root. * This method returns null if the servlet container cannot return a RequestDispatcher. * * The difference between this method and ServletContext.getRequestDispatcher(java.lang.String) * is that this method can take a relative path. **/ public RequestDispatcher getRequestDispatcher( String path ) { try { if (!path.startsWith( "/" )) path = combinedPath( getServletPath(), path ); return _servletRequest.getServlet().getServletConfig().getServletContext().getRequestDispatcher( path ); } catch (ServletException e) { return null; } }
/** * Returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path. * A RequestDispatcher object can be used to forward a request to the resource or to include the * resource in a response. The resource can be dynamic or static. * * The pathname specified may be relative, although it cannot extend outside the current servlet * context. If the path begins with a "/" it is interpreted as relative to the current context root. * This method returns null if the servlet container cannot return a RequestDispatcher. * * The difference between this method and ServletContext.getRequestDispatcher(java.lang.String) * is that this method can take a relative path. **/ public RequestDispatcher getRequestDispatcher( String path ) { try { if (!path.startsWith( "/" )) path = combinedPath( getServletPath(), path ); return _servletRequest.getServlet().getServletConfig().getServletContext().getRequestDispatcher( path ); } catch (ServletException e) { return null; } }