RequestProcessor.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:lams 作者:
/**
 * <p>Do a forward to specified URI using a <code>RequestDispatcher</code>.
 * This method is used by all internal method needing to do a forward.</p>
 *
 * @param uri Context-relative URI to forward to
 * @param request Current page request
 * @param response Current page response
 * @since Struts 1.1
 */
protected void doForward(
    String uri,
    HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {

    // Unwrap the multipart request, if there is one.
    if (request instanceof MultipartRequestWrapper) {
        request = ((MultipartRequestWrapper) request).getRequest();
    }

    RequestDispatcher rd = getServletContext().getRequestDispatcher(uri);
    if (rd == null) {
        response.sendError(
            HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
            getInternal().getMessage("requestDispatcher", uri));
        return;
    }
    rd.forward(request, response);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号