As a web user I tend to have problems with these sorts of pages as I don't use IE.

A lot of downloads where this sort of thing goes on often i end up with the file name of a php page rather than zip and stuff like that. My guess is is that IE is doing some of the work somewhere along the line, perhaps even windows.

So I guess when you retrieve a file that IE and/or windows doesn't have provision for it doesn't do whatever it does when this seems to work. In other words it does the same thing my browser/os does.

So my next guess is if you were to try wget or curl -O to request an action that does all this then you'll also get bla.action even for the file types that seem to work.

Sorry that may not be that helpful, but I'd be interested whether I'm tree-barking or not.

it would certainly narrow you problem down.

Cheers Mark

On Monday, October 27, 2003, at 10:02 PM, Nicholson, Robb wrote:


In one of our STRUTS applications, I have a screen that allows users to
upload and download files attached to an order. I have a JSP form that
allows the user to browse a file on their machine and upload it. Also on the
form is a list of the files already attached to the order, with links beside
each one to either view or delete the file.


When the user goes to view a file, I retrieve the file from the Oracle
database and send it to a servlet that sets it's content type appropriately
and then streams the file to the response writer.


This works great when it is a file type that the browser can handle. For
HTML, Word, Excel, JPG, etc, the browser window (Internet Explorer is our
corporate standard) will render the file perfectly.


However, for other file types, Explorer pops up a dialog box asking if you
want to view or save the file. When the user tries to save the file, the
default filename in the Save dialog is "FileView.action" (from the URL)
instead of the filename.


My question is this: Is there a way I can get the filename to come up
instead? Is there a way I can accomplish this without writing temp files on
the server?


My initial thought was to write the temp file and generate a URL to it
(someone on this list was doing that a few days back). But we don't want to
be creating a bunch of files on the server and not knowing when we could
clean them up, so streaming it is ideal.


If it matters, we are using JBoss 3.2.2 as the app server.

Thanks in advance,
Robb


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to