ajay brar wrote:

so how do you convert the jsp (resulting from the choices he made) to html? Say when i make a request for a jsp page, the server processes the request and what gets outputted to my browser is html. How can i force that to happen and pipe the output to a file?

Ajay: in my half asleep mode......


1. Write the file to the server filesystem, probably a temp directory, and call it by a unique name (time in millisconds and the session id maybe?).
2. Set the content type of the servlet response to something like 'application/octet-stream' (this will make sure the browser doesn't try to render it).
3. Stream the file to the response.
4. The client will be presented with the typical "save as" browser dialog box.



Check the Struts and Tomcat archives, you'll find more detail and probably some sample code in there.
Cheers,


James


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to