exporting data from a jsp to a text file...

Hi all.

I have a jsp which displays a set of results in a tablular form....my clients now want me to include a button in this jsp page on clicking which i will be able to export the entire data from the displayed page to a text file

can anyone suggest me as to how to go about it...

thanks

[329 byte] By [rohit29] at [2007-9-26 2:08:36]
# 1

Server side code(lets say servlet named exportServlet) behind the button can retreive the data in the same fashion as done for displaying on the JSP.

But then, exportServlet writes data back on the HTTP response using the mime type application/octet-stream.

See Javadoc for javax.servlet.ServletResponse.setContentType()

neville_sequeira at 2007-6-29 8:57:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...