What a browser does when a file of a certain type is sent to it by the server depends on the Content-Type HTTP header that's in the response.
If Content-Type is set to "text/xml", then the browser will probably display it as an XML file.
If the Content-Type is set to something that the browser doesn't recognise, then it will offer the user a Save As dialog box. If you set the Content-Type to "application/octet-stream" (which means: this is generic data), then it will most likely show you the Save As dialog box.
So what you need to do is set the Content-Type HTTP header of the response before you send back the file from your servlet.