Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • handling file downloads

    0 answers - 2436 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I did that by passing ognl expression (as string) that specifies the dataset as parameter to the service, so the service simply evaluates the GNL expression and uses its result as source.
    Konstantin Ignatyev
    PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000
    Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)
    Message
    From: Julian Wood <woodj (AT) ucalgary (DOT) ca>
    To: Tapestry users <users (AT) tapestry (DOT) apache.org>
    Sent: Tuesday, July 18, 2006 2:47:08 PM
    Subject: Re: handling file downloads
    I finally got back to this. I wrote up a service to send the csv
    files (using - thanks
    Shing for the example - well done), which all works fine, but I have
    one question (which could easily be addressed by using the
    "unsanctioned" approach mentioned in the FAQ - thanks Nick).
    Imagine you've done a bunch of work in home.html/home.java to create
    a set of data. Now you're ready to save it as a csv file. You click
    on the link which invokes the csv service, but it's unrealistic to
    pass all the parameters needed to re-create the data set to the
    service, or to even pass the data set itself (via a parameter).
    Home.java, of course, knows all about this set of data (as does the
    session). So how can the service be told to get the data set from
    Home.java (or from the session)? way around it seems to be to use
    a regular @DirectLink, which would create the file and then redirect
    to the csv service, which would then stream the file (instead of
    assembling it on the fly). It would be nicer though if it can be done
    without writing intermediate files.
    Any hints?
    Thanks,
    J
    10-Jul-06, at 4:49 PM, Julian Wood wrote:
    I would like to click a link, have a listener assemble a CSV file,
    and send it back as a download (ie change a few headers behind the
    scenes like Content-Type and Content-Disposition).

Re: handling file downloads


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Java"

EMSDN.COM