Solved

Content type in a servlet

Posted on 2001-07-31
6
1,375 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
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Accepted Solution

by:
dviji earned 100 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services spring boot application error 3 148
simple java question 3 44
maven project error 5 48
couple of eclipse 5 25
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now