Sun GlassFish Web Space Server 10.0 Secure Web Access Add-On Guide

Applet Rules for HTML Content

A single web page may contain many applets, and each applet may contain many parameters. Rewriter matches the values specified in the rule with the HTML definition of the applet and modifies the URL values present as a part of the applet parameter definition. This replacement is carried out at the server and not when the user is browsing the particular web page. This rule identifies and rewrites the parameters in both the applet and object tags of the HTML content.

This section is divided into the following parts:

Applet Rule Syntax

<Applet code="ApplicationClassName/ObjectID
" param="parametername" [valuePatterns="" source="*"] />


code is the name of the applet or object class (mandatory)

param is the name of the parameter whose value needs to be rewritten (mandatory)

valuePatterns See Using Pattern Matching in Rules.

source is the URL of the page that contains the applet definition (optional, default is *, meaning, in any page)

Applet Rule Example

Assume the base URL of the page is:

Page Content:

<applet codebase=”appletcode” code=”
RewriteURLinApplet.class” archive=”/test.jar”>
<param name=Test1 value="/index.html">


<Applet source="*/rule1.html" code=
"RewriteURLin*.class" param="Test*"/>


<APPLET codebase=”gateway-URL
applet/appletcode” code=”RewriteURLinApplet.class”
 archive=”/test.jar”><param name=”Test1” value="


The codebase attribute is rewritten because <Attribute name="codebase"/> is a defined rule in the default_gateway_ruleset.

All parameters whose names begin with Test are rewritten. The base URL of the page on which the applet code displays and the Gateway URL are prefixed to the value attribute of the param tag.