Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP API

 
mrsmithq
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know JSP is mainly java, but is there a seperate API?
I am looking for a function that can detect a user's Browser Type.
 
Jeff Sunder
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to check the http headers to determine the browser type. Here is a little script that works for me
<%
//determine browser type
if (request.getHeader("USER-AGENT").indexOf("MSIE") >= 0) {
//Your code here
}else{
//Your code here
}
%>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic