struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Anderson" <stuts_anderson...@hotmail.com>
Subject Re: Returning raw data from an action
Date Mon, 01 Dec 2003 20:12:26 GMT
from http://marc.theaimsgroup.com/?l=struts-user&m=106730742008404&w=2
modified slightly:

    // Now write the actual content type and data
    response.setContentType("text/plain");
    JspWriter stream = response.getWriter();
    ... write out the csv ...

    // Return null to tell Struts the response is complete
    return (null);

-Ben

>From: "Jim Kennedy" <jimk@gigaheads.com>
>Reply-To: "Jim Kennedy" <jgkennedy@mindspring.com>
>To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>Subject: Returning raw data from an action
>Date: Mon, 1 Dec 2003 14:49:54 -0500
>
>I have a need to process a large amount of data and return a csv file to 
>the
>client.  Is it possible to do this with a Struts action?  Is so, what would
>I return as an ActionForward (see below)?
>
>return mapping.findForward("blabla);
>
>or
>
>return mapping.findForward(null);
>
>
>I don't want to forward anywhere.  And I'm not returning HTML data either.
>I know, I know should use model 2, but I can't in this case. Too much
>overhead with 50k records.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>

_________________________________________________________________
Share holiday photos without swamping your Inbox.  Get MSN Extra Storage 
now!  http://join.msn.com/?PAGE=features/es


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message