I’m developing a JSF 2.0 portlet for Liferay 6.0.6 (Plugins SDK 6.1) and I need file upload functionality. I tried the following different solutions without success:
- Tomahawk
- overriding
ActionRequestprocessing bridge:inputFilecomponent
Any suggestion how to do it is welcomed, also hacks or using other technologies than JSF.
Why not use a standard HTML form so:
Then in your Java code override the processAction method (usually in a class that extends GenericPortlet or maybe Liferay’s MVCPortlet or JSPPortlet (for 5.2.3)) and then you can get the file itself by:
Job done! 🙂 This is only skeleton code, and there will be exception handling you need to do but your IDE will help with that.
~~ EDIT ~~~
Other possible solution maybe to use:
This I got from: http://ironicprogrammer.blogspot.com/2010/03/file-upload-in-jsf2.html
Is that any help?