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

Form Rule Example

Assume the base URL of the page is:

Page Content

Assume the page URI is form.html and is located in the root directory of the server.

<form name=form1  method=POST action=
<input type=hidden name=abc1 value="0|1234|/test.html">

To rewrite /text.html present in the value of hidden field named abc1 which is part of form1. The following rules are needed.


<Form source="*/form.html" name="form1" 
field="abc1" valuePatterns="0|1234|"/>
<Attribute name="action"/>


<FORM name=”form1” 
method=”POST” action="gateway-URL/">
<input type=hidden name=abc1 


The action tag is rewritten using some defined HTML attribute rule.

The input tag attribute value’s value is rewritten as shown in the output. The specified valuePatterns is located, and all content following the matched valuePatterns is rewritten by prefixing the Gateway URL, and the base URL of the page. See Using Pattern Matching in Rules.