John Topley's KnowledgebaseUsing The Struts Logic Tag To Detect Browser VersionMonday, 01 December 2003The Jakarta Struts <logic:match> tag can be used to detect the version of the web browser being used to view the page. The tag performs a case-insensitive substring search using the value specified. This enables the User-Agent string in the HTTP header to be queried for the browser version. The code given below displays “Microsoft Internet Explorer 6.0” if running IE 6.0, or “Opera” or “Mozilla” if running any version of those browsers. Download 0031.txt
<logic:match header="User-Agent" value="IE"> |
![]() |

