DispatcherRenderParameterTest.java 文件源码

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

项目:portals-pluto 作者:
protected TestResult checkAddedSameNameParameter(PortletContext context,
                                                 PortletRequest request,
                                                 PortletResponse response)
throws IOException, PortletException {
    // Dispatch to the companion servlet: call checkAddedSameNameParameter().
    StringBuffer buffer = new StringBuffer();
    buffer.append(SERVLET_PATH).append("?")
            .append(KEY_TARGET).append("=").append(TARGET_ADDED_SAME_NAME_PARAM)
            .append("&").append(KEY_RENDER).append("=").append(VALUE_ADDED1)
            .append("&").append(KEY_RENDER).append("=").append(VALUE_ADDED2);

    if (LOG.isDebugEnabled()) {
        LOG.debug("Dispatching to: " + buffer.toString());
    }
    PortletRequestDispatcher dispatcher = context.getRequestDispatcher(
            buffer.toString());
    dispatcher.include((RenderRequest) request, (RenderResponse) response);

    // Retrieve test result returned by the companion servlet.
    TestResult result = (TestResult) request.getAttribute(RESULT_KEY);
    request.removeAttribute(RESULT_KEY);
    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号