You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org> on 2007/03/29 22:11:25 UTC

[jira] Commented: (TOMAHAWK-33) Tomahawk's use of HttpServletRequest breaks JSF Portlets

    [ https://issues.apache.org/jira/browse/TOMAHAWK-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485334 ] 

Mike Kienenberger commented on TOMAHAWK-33:
-------------------------------------------

Blazej Kepa,

Your patch looks great.   Unfortunately, it's no longer valid.   I couldn't determine where to apply it.  Please provide an updated version.   In the future, it would be helpful to create patches with fully-qualified paths relative to the root of the project.

> Tomahawk's use of HttpServletRequest breaks JSF Portlets
> --------------------------------------------------------
>
>                 Key: TOMAHAWK-33
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-33
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Portlet_Support
>            Reporter: Stan Silvert
>         Assigned To: Stan Silvert
>         Attachments: AddResource.239380.patch, AddResource.patch
>
>
> I have a report of a user who wanted to use JSCookMenu in a portlet.  This results in a ClassCastException because org.apache.myfaces.component.html.util.AddResource assumes that the underlying request object will be an HttpServletRequest.
> I will fix this for AddResource, but I suspect that there are other offending classes in Tomahawk.  
> For future reference, you should always use methods from  ExternalContext instead of doing (HttpServletRequest)ExternalContext.getRequest().
> If you MUST use features of HttpServletRequest that ExternalContext doesn't offer then you should use the PortletUtil to make sure that you don't break portlets.  To tell if you are running in a portlet environment, you can say:
> org.apache.myfaces.portlet.PortletUtil.isPortletRequest(FacesContext facesContext)
> Note: calling PortletUtil does not put any dependency on the Portlet API.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.