[ 
http://issues.apache.org/jira/browse/MYFACES-434?page=comments#action_12421963 
] 
            
Ryan Wynn commented on MYFACES-434:
-----------------------------------

I had to work around the problem of using tomahawk file upload in IBM WebSphere 
Portal 5.1.  Attached is a zip file containing three classes - 1 of which 
extends MyFacesGenericPortlet to support file upload.  

You can basically switch from using MyFacesGenericPortlet and point to 
FileUploadCapablePortlet instead.  Then you can follow the instructions on the 
myfaces wiki http://wiki.apache.org/myfaces/Setup_For_File_Uploads.  The only 
change is in Step 1.  Instead of configuring the maxfilesize, 
uploadthresholdsize, and repository location in web.xml you should configure 
these attributes as init-params in portlet.xml.

For example...

<portlet-class>
        gov.cbp.ace.pcs.fileupload.FileUploadCapablePortlet
</portlet-class>
                
<init-param>
        <name>max-file-size</name>
        <value>100m</value>
</init-param>
                
<init-param>
        <name>memory-threshold-size</name>
        <value>100k</value>
</init-param>
                
<init-param>
        <name>upload-repository-path</name>
        <value>/temp</value>
</init-param>

I have found that this works in IBM Portal 5.1.  I am not sure that it works in 
other portal containers because it assumes that the ActionRequest is 
implemented as an HttpServletRequest under the covers.  Since PortletRequest 
and ActionRequest are interfaces the underlying implementation is totally up to 
the portlet container.



> MyFaces's Portlet enhancement
> -----------------------------
>
>                 Key: MYFACES-434
>                 URL: http://issues.apache.org/jira/browse/MYFACES-434
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: Portlet_Support
>    Affects Versions: 1.1.0
>         Environment: LInux, J2SE 1.4.2
>            Reporter: Shinsuke SUGAYA
>         Assigned To: Stan Silvert
>         Attachments: filter051230.patch, filter051230.tar.gz, 
> filterportlet.patch, filterportlet.tar.gz, headerresource_for_j2.tar.gz, 
> impl-filter-noAddResources-060315.patch, newfile_for_portlet.tar.gz, 
> patch_for_portlet.patch, tomahawk-filter-noAddResources-060315.patch, 
> Tomahawk_FileUpload_IBMPortal.zip
>
>
> MyFacesGenericPortlet does not fully support the feature of tomahawk 
> component, such as inputHtml and fileUpload. So, I request the following 
> feature to run it on portlet:
> - support tags in <head> (ex. inputHtml component)
> - support upload (fileUpload component)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to