[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Content type in a servlet

Posted on 2001-07-31
6
Medium Priority
?
1,389 Views
Last Modified: 2013-11-24
I am trying to redirect the contents of my page to a spreadsheet and I use
res.setContentType("application/vnd.ms-excel");
to set the content type.
This works when I use Excel 97 but with newer releases of Excel (eg: 2000) it doesn't.
Help!!!
Thanks.
0
Comment
Question by:luw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:dviji
ID: 6338301
Hi,
   Some suggestion to find out that MIME Type...
  Open explorer and goto View -> Folder Options. In that goto file types tab, in that search for Microsoft Excel Worksheet. It will give you what is the Content Type(MIME type). Apply this in your ContentType. It may help you.


...dviji
0
 

Author Comment

by:luw
ID: 6340935
Thanks. Now I know what the MIME types are for Excel 97 and Excel 2000. But how can write my servlet to work with both versions? Thanks.
0
 

Author Comment

by:luw
ID: 6340938
Thanks. Now I know what the MIME types are for Excel 97 and Excel 2000. But how can write my servlet to work with both versions? Thanks.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
dviji earned 300 total points
ID: 6341122
You can get the available mimie types by using javascript navaigator.mimeTypes

But one thing is navigator works only in Netscape ;-(((. I don't know how to check in IE...

...dviji
0
 

Author Comment

by:luw
ID: 6342076
Thanks for the info. Can you give me some examples on how I can use it?
0
 

Author Comment

by:luw
ID: 6388890
Thanks for all the info. I'm still trying to find out how to get my code to work with Excel 2000. Sorry for the delayed repsonse!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question