I have a jsp a link to download the file that I get from database as BLOB.
I am using spring, so I have a controller, go get the file from database, and outstream the file and instream, but when I click on the links download, the dialog box not display, to allow me SAVE or OPEN file. Please help
If you're streaming binary data you should change this to match its mime type.
1.) Your sample code in the first post shows it hard coded.
Which are you using?
2.) The servlet spec provides a method for getting the mime type for all the most common extensions. If you're dealing with uncommon file types, you can add your own to web.xml.
Originally posted by jay lai:
I did look into the actual line of code, and it is the = sign instead of ==; but still not make any progress, the dialog box still not display
Anything that i possibly miss from the previous posted? I could not figure out, please advise...
That line in your JSP should be blowing up.
<%filename%> is not a valid scriptlet.
To make it a JSP expression, you'll need to add the = symbol.
I did look into the actual line of code, and it is the = sign instead of ==
Please read the following article carefully.
Always cut and paste the actual code into Javaranch to avoid wasting time on false bugs in your code. People will quickly tire of helping you if everything they find turns out to be a typo in your posts here but not in the actual code.
Unfortunately, i work at 2 different machine, the machine with actuall code does not have connection to the web browser, therefore , i have to re-type the code manually each time.