protected void doInclude()

in tiles-request-velocity/src/main/java/org/apache/tiles/request/velocity/VelocityRequest.java [117:136]


    protected void doInclude(String path) throws IOException {
        ServletRequest servletRequest = org.apache.tiles.request.servlet.ServletUtil.getServletRequest(this);
        HttpServletRequest request = servletRequest.getRequest();
        HttpServletResponse response = servletRequest.getResponse();
        RequestDispatcher rd = request.getRequestDispatcher(path);

        if (rd == null) {
            throw new IOException("No request dispatcher returned for path '"
                    + path + "'");
        }

        PrintWriter printWriter = getPrintWriter();
        try {
            rd.include(request, new ExternalWriterHttpServletResponse(response,
                    printWriter));
        } catch (ServletException ex) {
            throw ServletUtil.wrapServletException(ex, "ServletException including path '"
                    + path + "'.");
        }
    }