• 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

Opening Excel with JSP

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Every body...

I am trying to open an excel sheet from a jsp page using setContentType();

Its opening but its giving garble data... I have also tried using <mime-mapping>, with no luck.

Am using wls 8. could any one suggest an option for this.

Thanks.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "open"? Are you streaming an XLS file to the client? If so, that won't work. JSPs are for text, not for binary content; you need to use a servlet instead. If you're trying to do something else, please describe it in more detail.
 
Jetendra Ivaturi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to download the excel sheet. I mean to say am using setContentType(application/vs.ms-excel).

However its working fine in tomcat. Am able to download the excel sheet.

Where as in weblogic it wasn't possible.

My doubt is with content type.

So have use reset() method of response object. Its working fine.

Thanks for your time.

Ulf Dittmer... Is that the right behaviour what am doing?

Kindly suggest, Thanks once again.
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic