<%

// This sample is provided under the terms of the BrowserHawk End User License
// Agreement.  Copyright (c) 2003-2011 cyScape, Inc.  All rights reserved.

// This sample demonstrates how to detect basic properties using BrowserHawk.
// "Basic" properties are properties that are the same for all browsers of the
// same type, version and platform.  For example, the Browser, OSName,
// OSDetails, Version, FileUpload, and XML properties will always be the same
// for a specific browser such as IE 9.0 on Windows 7.  These are properties
// that the end user does not affect by changing their preferences or settings
// on their computer.

// Conversely, "extended" properties are properties which can vary depending
// on how a user has configured their browser or system.  Broadband,
// CookiesEnabled, Plugin_Flash, WidthAvail, and HeightAvail are examples of
// extended properties.  Extended properties are a bit more advanced so we do
// not cover them here in this basic sample.  Instead see the popular.jsp for
// more information on detecting extended properties.

// For more information see:
// http://cyscape.com/docs/showhelp.asp?topic=basic_vs_extended_browser_properties

%>

<%
// First let's import the com.cyscape.browserhawk namespace
%>

<%@ page import = "com.cyscape.browserhawk.*" %>


<%
// Now we get an immutable (unchangable) instance of the browser object which
// represents the "basic" (as defined above) properties this browser supports.
// Note that we do this by using the static factory method
// BrowserHawk.getBrowserInfo().
%>

<% BrowserInfo browser = BrowserHawk.getBrowserInfo(request); %>

<%
// At this point our browser object contains all the basic browser capability
// information for the current visitor.  Let's display this information to the
// screen to show what we've detected for this particular browser.
%>

<html><title>BrowserHawk Sample - Basic Browser Detection (Java)</title></head>
<body><font face="arial">
<blockquote>

This sample demonstrates how to detect basic properties using BrowserHawk.
"Basic" properties are properties that are the same for all browsers of the
same type, version and platform.  For example, the Browser, OSName,
OSDetails, Version, FileUpload, and XML properties will always be the same
for a specific browser such as IE 9.0 on Windows 7.  These are properties
that the end user does not affect by changing their preferences or settings
on their computer.

<P>

Conversely, "extended" properties are properties which can vary depending on
how a user has configured their browser or system.  Broadband, CookiesEnabled,
Plugin_Flash, WidthAvail, and HeightAvail are examples of extended properties.
Extended properties are a bit more advanced so we do not cover them here in
this basic sample.  Instead popular.jsp demonstrates how to detect extended
properties.  <P>

See the <a href="http://cyscape.com/docs/showhelp.asp?topic=basic_vs_extended_browser_properties" target="_new">Basic Vs. Extended Properties topic</a>
in the documentation for more details on how basic and extended properties
differ.
<P>
<HR>
<P>

Your browser is: <%= browser.getBrowser() %> <%= browser.getFullversion() %><P>


Your operating system is: <%= browser.getOSDetails() %><P>
Browser major version: <%= browser.getMajorver() %><P>
Browser minor version: <%= browser.getMinorver() %><P>
Supports AJAX? <%= browser.getXMLHttpRequest() %><P>
Supports ActiveX controls? <%= browser.getActiveXControls() %><P>
Is mobile device? <%= browser.getMobileDevice() %><P>
Is based on WebKit? <%= browser.getWebKit() %><P>
Is based on Gecko? <%= browser.getGecko() %><P>
Browser data file version: <%= browser.getBDDVersion() %>, dated: <%= browser.getBDDDate() %><P>
BrowserHawk version in use: <%= BrowserHawk.getVersion() %><P>

<HR>

<P>
<b><a href="basics.jsp">Retry this test</a></b><P>
<b><a href="index.html">Return to list of other JSP samples</a></b><P>
<b><a href="http://www.cyscape.com/order/">BrowserHawk Pricing and Ordering</a></b><P>
<b><a href="http://www.cyscape.com/">cyScape home page</a></b><P>
</font></blockquote>
</body>
</html>
