posts - 65, comments - 41, trackbacks - 0, articles - 0
   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理
在JSP开发过程中,我比较喜欢使用自定义标签,但是在开发JSR168Portlet时,有时候需要在自定义标签中使用PortletRequest, PortletRespose,如何取得这两个东西呢?
//PortletRequest简单
PortletRequest portletReqest = (PortletRequest) pageContext.getRequest();
//PortletResponse不能这样干,会出ClassCaseException
PortletApiUtils portletUtils = PortletApiUtils.getUtilsInstance();
PortletResponse portletResponse = (PortletResponse) portletUtils.getPortletResponse((HttpServletRequest) pageContext.getRequest());

标题  
姓名  
主页
验证码 *  
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
 
 
相关链接:
网站导航: