PortletRequestHelper.java 文件源码

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

项目:displaytag 作者:
/**
 * Creates a new request helper for the specified PageContext. Retrieves the PortletRequest and RenderResponse from
 * the PageContext.
 * @param pageContext Current JSP context.
 * @throws IllegalStateException If the PortletRequest or RenderResponse are not found in the PageContext.
 */
public PortletRequestHelper(PageContext pageContext)
{
    if (pageContext == null)
    {
        throw new IllegalArgumentException("pageContext may not be null");
    }

    this.portletRequest = (PortletRequest) pageContext.findAttribute(JAVAX_PORTLET_REQUEST);
    if (this.portletRequest == null)
    {
        throw new IllegalStateException("A PortletRequest could not be found in the PageContext for the key='"
            + JAVAX_PORTLET_REQUEST
            + "'");
    }

    this.renderResponse = (MimeResponse) pageContext.findAttribute(JAVAX_PORTLET_RESPONSE);
    if (this.portletRequest == null)
    {
        throw new IllegalStateException("A RenderResponse could not be found in the PageContext for the key='"
            + JAVAX_PORTLET_RESPONSE
            + "'");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号