Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
avoiding the file download dialog box
subin john Malikayil
Joined: Mar 08, 2007
Feb 12, 2008 13:31:00
how can we open a
document which is in a shared drive by avoiding the file download dialog box.
the application which i am developing is a web based application.
on click on a button i need to copy a template(excel) from the server to a shared folder and then have to open it for the user.
the application is working fine, now the challange is avoiding the file download dialoge box.
can any once please give some light on this subject....
adivce of any kind is appriciated...
thanks in advance
Joined: Dec 11, 2004
Feb 12, 2008 14:38:00
The user would have to have an application associated with that file type for the browser to know what to do with it.
If they do, you can set the Content-Type header with the appropriate mime type. Then set the Content-Disposition header using 'inline' instead of 'attachment'.
If all these things are done, the browser should open the file in the associated application.
See the JspAndExcel entry in the
PS: If you're working with a binary Excel file, you'll probably need to stream the data to the browser using a
(JSPs don't do this well).
there is a servlet example called SimpleStream that shows how to do this.
How to ask a question...
Simple Servlet Examples
It is sorta covered in the
JavaRanch Style Guide
subject: avoiding the file download dialog box
Regarding Excel sheel in jsp
File Download Dialog
File download box in IE 6.0 opening twice
opening an excel file through Java
how to download or view the "Excel FILE "i n IE browser
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013