Hi All, i want to write a servlet that generates report in text format using data read from database. i am confused over creating reports using servlets. Can anybody please tell me how to create report in text format using servlets?
What's confusing you? You'd set the content type of the response to "text/plain" and emit the report data just as if you were writing to any other output stream.
Hi Bibeault, I tried your suggestion of "text/plain" but what ever i write is coming on browser window only. I tried res.setContentType("application/text"),and i got an alert window for saving file.
I want to show report in notepad. Is there MIME type to do so? Please tell me a way to achieve this.