Sending a file as an attachment with a servlet?
I am hvaing trouble sending a file as a result of a post in a HTML form
using a servlet. The file has to be generated for each request. .
After the user has recieved the file, then IE "hangs". It doesn't switch
screen when I press a hyperlink and I have to press "refresh" to continue. I
have included my code. Any help would be most appreciated!
String toSend = "<file><data>testdata</data></file>";
PrintWriter out = response.getWriter();
catch (Exception e)
ServletOutputStream out = response.getOutputStream();
out.println("An error has occured <br>");
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL