The Common-Controls Tag Library

<util:browserinfo>

Creates a hidden field within the html page. The field will be filled with informations about the browser. The value within the request can be used to create an opbject of type BrowserInfo. Therefore the framework offers the following method BrowserInfo.setFromRequest().

// using default name
BrowserInfo.setFromRequest(request);

// or userdefined name "myinfo"
BrowserInfo.setFromRequest(request, "myinfo");

The BrowserInfo object can be used internally to check if Javascript is supported on the client side.

Tag class: BrowserInfoTag
 

[ Syntax ]

Standard Syntax
<util:browserinfo
[ name = "String" ]
/>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
nameString Specifies the name of the field. If no name is specified it will be named com.cc.framework.Globals.browser (see Globals.BROWSER_INFO_KEY).  

[ Example ]

A login page which also gather some information about the users browser


<%@ taglib uri="http://struts.apache.org/tags-html"             prefix="html" %>
<%@ taglib uri="http://www.common-controls.com/cc/tags-util"   prefix="util" %>

<html:form action="/login.do">

   <%--  gather some information about the users browser  --%>
   <util:browserinfo/>

   <!--  login fields  -->
</html:form>