Sun Java System Portal Server Secure Remote Access 7.2 管理指南

表單規則範例

假設此網頁的基準 URL 是:

http://test.siroe.com/testcases/html/form.html

網頁內容

假設網頁的 URI 是 form.html 且位於伺服器的根目錄中。

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

要重新寫入出現在 form1 中名為 abc1 的隱藏欄位值中的 /text.html,需要下列規則。

規則

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

輸出

<FORM name="form1" 
method="POST" action="gateway-URL/
http://test.siroe.com/testcases/html/form.html">
<input type=hidden name=abc1 
value="0|1234|gateway-URL/
http://test.siroe.com/test.html">
</FORM>

描述

action 標記是使用某些已定義之 HTML 屬性規則所重新寫入的。

輸入標記屬性值的 value 的重新寫入方式如輸出中所示。已找出特定的 valuePatterns,然後即利用前置閘道 URL 及網頁的基準 URL 來重新寫入符合的 valuePatterns 後面的所有內容。請參閱在規則中與式樣相符