The other option is to map the data then send it to a view that is ftl
that  will generate the excel as a mime. you can even do this as a mini
lanquage script, instead of java to pull the data then send the map in
context to the ftl.


tanzeem.mb sent the following on 5/5/2009 1:46 AM:
> Hi
> 
> I am trying to get a dynamically generated excel report to be streamed back
> to the browser.
> How should i write my java method so that i can use the HTTPServletResponze
> and org.ofbiz.base.util.UtilHttp.streamContentToBrowser(HttpServletResponse
> response, byte[] bytes, java.lang.String contentType) to return data.
> 
> My request-response map is as below:
> 
> <request-map uri="createReport">
>         <security https="true" auth="true"/>
>         <event type="service" invoke="crmsfa.createReport"/>
>         <response name="success" type="view" value="showReport"/>
>         
>         <response name="error" type="request-redirect" value="viewReport"/>
>     </request-map>
> 
> What changes should i make to the following method .
> public static Map createReport(DispatchContext dctx, Map context) {
> --------
> --------
> }
> 
> How can i make the HTTPServletResponse object available in my java service
> method
> 
> Can anyone give any sample java file using HTTPServletResponse object in the
> service method
> 
> Thanks
> Tanzeem

-- 
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.

Reply via email to