--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> Quite honesty, I couldn't make the connection, in my
> head, on how the result parameters in my .xml file
> corresponded to the action and method I am working
in.
I think the stream result is specifically to stream
the contents of an existing file, not for manually
creating the output in an action (I could be wrong;
it's been over an hour snice I was last wrong, so I'm
quite a bit overdue). If you wanted to go this route
you'd probably have to physically create the file.
> 1. I [don't] have to use the execute method,
correct?
Correct.
You can still do write directly to the response; just
return null from the action so the normal processing
breaks (stuff left out for brevity, and this is off
the top of my head):
public String csv() {
HttpServletResponse response =
ServletActionContext.getResponse();
out = response.getWriter();
response.setHeader("Content-Disposition",
"attachment; filename=export.csv");
response.setContentType("text/csv");
out.println("Id,Date,Comment");
for (Comment c : _comments) {
...etc...
}
return null;
}
d.
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]