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

DJS Attribute Example

Assume the base URL of the page is:

Page Content:


<input TYPE=TEXT SIZE=20 value=focus onClick="Check(\q/focus.html\q,\qfocus\q);return;">



<Attribute name=”onClick” type=”DJS”/>
<Function type="URL" name="Check" paramPatterns="y,"/>



<INPUT TYPE=TEXT SIZE=20 value=focus onClick="Check(\q



Two rules are required to rewrite the specified page content. The first rule identifies the onClick JavaScript token. The second rule identifies the parameter of the check function that needs to be rewritten. In this case, only the first parameter is rewritten because paramPatterns has the value y in place of first parameter.

The Gateway URL and the base URL of the page on which the JavaScript tokens appear are prefixed to the required parameter.