<%

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

// This sample demonstrates how to use the BrowserHawk4J library to detect
// basic properties.  "Basic" properties are properties that are the same for
// all browsers of the same type, version and platform.  For example, the
// Browser, Platform, Version, FileUpload, and XML properties will always be
// the same for a specific browser such as IE 7.0 on Windows XP.  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, Platform, Version,
FileUpload, and XML properties will always be the same for a specific browser
such as IE 7.0 on Windows XP.  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 platform is: <%= browser.getPlatform() %><P>
Browser major version: <%= browser.getMajorver() %><P>
Browser minor version: <%= browser.getMinorver() %><P>
Container* browser: <%= browser.getContainerBrowser() %><P>
Container version: <%= browser.getContainerVersion() %><P>
Container full version: <%= browser.getContainerFullversion() %><P>
Supports AJAX? <%= browser.getXMLHttpRequest() %><P>
Supports ActiveX controls? <%= browser.getActiveXControls() %><P>
Browser data file version: <%= browser.getBDDVersion() %>, dated: <%= browser.getBDDDate() %><P>
BrowserHawk version in use: <%= BrowserHawk.getVersion() %><P>

<p>
*Note: The "Container" properties are used to detect cases where an IE
rendering engine is running inside of another browser.  For instance Netscape
8 and later and AOL Explorer can emulate IE.  In these cases the
ContainerBrowser, ContainerVersion, and ContainerFullversion will contain
details about the browser that the IE engine is running inside of.  For
instance with Netscape 8.0.0.3 running in IE emulation mode, BrowserHawk will
return "Netscape", "8.0", and "8.0.0.3" for these properties respectively. 
<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>
