Skip to Main Content

Java Development Tools


For appeals, questions and feedback, please email

File download from a portletized ADF app running in webcenter spaces.

783906Oct 1 2010 — edited Oct 4 2010

I am having trouble downloading non static files from a portletized(with ADFPortletBridge) ADF application running as a portlet producer in Webcenter spaces .
This is my scenario :

Jdev :
Webcenter : 11.1.1

The ADF app has a query page, that uses the af:query component to do a query and display results on a table. This table data need to be exported as a file with some changes like splitting address to component city and state columns .

The ADF app makes use of af:filedownloadlistener to get this(HTML formatted file with an .xls ext is our current preference to get it to open in excel, but could be anything) done . The ADF app works just fine, but as section in the web center dev guide points out

> The <af.fileDownloadActionListener> component is not supported.
The actual behavior however is that the export happens when triggered, but the component keep serving up the same file it created the first time it got invoked every subsequent time.

The alternatives I've considered so far are :
1. <af:exportCollectionActionListener> - Exports what you see on the UI table. Would not work for us, because our exported data is different than whats on screen. (eg: whole addresses are displayed as a single column, but broken down as component city and state columns in exported data )

2. redirect to a servlet - admittedly half baked idea - fiire an action that will generate the report, then put it in sessionScope , redirect to a servlet that would pick up the report from session and stream it to the user by setting the servlet's response content type. Very unsure if this would fly in a portlet environment (sorry, I'm new to portlets) and even if it does, section in the web center dev guide says :
Do not redirect or forward a request within your JSP. JSR 168 only supports requestDispatcher.include(). The use of httpServletResponse.sendRedirect() or requestDispatcher.forward() results in exceptions and errors.
Am I overlooking some feature that would let me do this or whats the recommended method to achieve this functionality of exporting a file generated at run-time in a portlet environment ?

Edited by: Jeevan Joseph on Oct 1, 2010 4:14 PM
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2010
Added on Oct 1 2010