File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes XML file download Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "XML file download" Watch "XML file download" New topic
Author

XML file download

Miguel Roque
Ranch Hand

Joined: Oct 24, 2002
Posts: 126
Hi.

I'm making a servlet that will process some information from the database and then must return a XML file to the user. How can I automaticaly send the result XML file to the client in the servlet, meaning, how can the browser present a message where the user is asked where to save the file?

A second question, not directly related to servlets, what is the best package to create the XML file? I'm testing with javax.xml.stream but I'm affraid that this could not handle the XML file that can be up to 140Mb or even more!

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Set your content-type and content-disposition headers as appropriate for the type of activity you'd like.

Your unrelated question should be asked in another forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: XML file download
 
Similar Threads
Spring MVC Request Mapping
xml in j2me
AJAX Best Practices
Generating XML feed for users.
getting XML schema using java.