File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how to detect MS excel using servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to detect MS excel using servlet?" Watch "how to detect MS excel using servlet?" New topic

how to detect MS excel using servlet?


Joined: Aug 16, 2001
Posts: 24
I'm trying to detect MS excel from a machine so that I can display an excel link.
What I do from my jsp is:
String s = request.getHeader("Accept");
I can see MS-excel if I don't click IE refresh button. If I click the IE Refresh button to reload my jsp, my string becomes */*.
Does anybody know how to fix this problem, is there another way to get ms-excel better?

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31817

Why don't you just set the content type for excel and let the browser handle the Excel itself?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: how to detect MS excel using servlet?