Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to detect MS excel using servlet?

 
June
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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?
Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34378
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
June,
Why don't you just set the content type for excel and let the browser handle the Excel itself?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic