WebSphere Portal Server - Casting HttpServletResponse to PortletResponse works in jsp page but not in custom tag

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > August 2005 > Casting HttpServletResponse to PortletResponse works in jsp page but not in custom tag





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Casting HttpServletResponse to PortletResponse works in jsp page but not in custom tag

2005-08-25, 6:05 pm

I am using Websphere portal server 5.1. My portlet's doView() method includes a jsp page "taskList.jsp". Within this page I use a custom tag called "taskList". The taskList tag is mapped to the class <code>TaskListTag.java</code> which extends <code>TagSu
pport</code>
The strange thing is that, within the jsp page I am able to cast the response instance to PortletResponse:
<code>
<%
org.apache.jetspeed.portlet.PortletResponse portResp = (org.apache.jetspeed.portlet.PortletResponse portResp) response;
%>
</code>
However in the TaskListTag.java I cannot cast the response to PortletResponse. The following code in the doStartTag() method returns false:
<code>
(pageContext.getResponse() instanceof PortletResponse)
</code>
Can anybody tell me why I can cast to PortletResponse in the jsp-file but not in the tag? I thought that if the jsp-file encounters a tag, that it forwards its own request and response parameters to the tag-class.

Any ideas are greatly appreciated.
Dennis
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com