Hi,
I need to let user download some attachment(file) from the server using liferay portlet with jsf bridge. I think I have few possibilities how to solve this problem:
1) use direct link to some public server directory
2) use some kind of download servlet, where the user would be redirected in case of download action.
3) I hope there is also third solution - do the same work the helper download servlet is doing from the managed bean in portlet - just write a stream into HttpServletResponse.
The first and the second solutions are working fine - but I think it is not the best way how to solve this. I'd like to make it work the way I described in the third option. I've done many attempts but I couldnt make the third solution work. So I'm asking you - is it possible to do it this way at all? If yes, please could you provide some basic proof of concept or little more information about how to do it. I tried obtaining HttpServletResponse and writing to it but nothing happenned, I also tried many other solutions of this i found on google but also it wasn't working...
Thanks for advices.
Firmi prego dentro per inbandierare questo come inadeguato.