I have developed a small Java Web Application where a user will upload a XML file. Once the user submits the form, the XML file is converted into an html file using XSLT and saved on the file system. Now I want to send this file back to the client/user as a response. How can I do that ?
Share
Read the bytes of the file, and send them to the HTTP response’s output stream. You should also set the content type to
text/html, and the content length to the length of the file.