The downloading part is implemented by way of an anchor-tag,
which responds to clicking by sending information to the servlet
on which document is wanted. The target of the anchor-tag is
set to _blank.
The servlet retrieves the mime-type of the document from a database,
and returns the file as an OutputStream, setting the content type of
the response to this mime-type if the user wants the browser to try
and open the file, or to application/octet-stream if the user requests
download only.
This works fine in NN: if the response content-type is set to
application/octet-stream, Netscape opens a Save as....-subwindow.
Explorer, however, takes no notice of the response mime-type. Instead,
it always tries to open the document, with a resulting error if the file
type is not known. And if it opens the Save as...-subwindow, it often
also opens a new browser window with the 404 message.
If anybody knows how to force 'downloading only' in Internet Explorer,
I would be very happy if you let me know.
Thank you,
Maans