how to save to a csv file in JSP

From: Jason (jhsu8999_at_yahoo.com)
Date: 04/30/04

  • Next message: NOBODY: "Re: Pausing Threads From Events"
    Date: Thu, 29 Apr 2004 18:11:22 -0600
    
    

    Hi, all,

    I have a JavaServer Page which get data from database then display it for user
    to review; and now, how can I have a button somewhere in the result page which
    let user save current result to a text (CSV) file.

    fo example, below is what user will see from a web browser:
    - - - - - - - - - - - - - - - - -
    field1 | field2 | field 3 |
    - - - - - - - - - - - - - - - - -
    A101 |A201 |A301 |
    - - - - - - - - - - - - - - - - -
    B101 |B201 |B301 |
    - - - - - - - - - - - - - - - - -

    output file:
    result.csv
    field1,field2,field3
    A101,A201,A301
    B101,B201,B301

    Thanks in advance.


  • Next message: NOBODY: "Re: Pausing Threads From Events"
  • Quantcast