wood burning stoves
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 32635

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]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: how to detect MS excel using servlet?
It's not a secret anymore!