• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

avoiding the file download dialog box

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how can we open a excel 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
subin

subin.subinjohn@gmail.com
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 Servlets Faq.

-Ben


PS: If you're working with a binary Excel file, you'll probably need to stream the data to the browser using a servlet (JSPs don't do this well).
In our CodeBarn there is a servlet example called SimpleStream that shows how to do this.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic