Sun Java System Portal Server Secure Remote Access 7.2 관리 설명서

URL 매개 변수 예제

페이지의 기본 URL이 다음과 같다고 가정합니다.

http://abc.sesta.com/test/rewriter/test1/jscript/test2/page.html

페이지 컨텐트

<script language="JavaScript">
<!--
function test(one,two,three){
alert(one + "##" + two + "##" +three);
}
test("/test.html","../test.html","123");
window.open("/index.html","gen",width=500,height=500);
//-->
</SCRIPT>

규칙

<Function name="URL" name="test" paramPatterns="y,y,"/>
<Function name="URL" name="window.open" paramPatterns="y,,,"/>

결과

<SCRIPT language="JavaScript">
<!--
function test(one,two,three) {
alert(one + "##" + two + "##" +three);
}
test("gateway-URL/http://abc.sesta.com/test.html","
gateway-URL/http://abc.sesta.com/test/rewriter/
test1/jscript/test.html","123");window.open("gateway-URL/
http://abc.sesta.com/index.html","gen",width=500,height=500);
//-->
</SCRIPT>

설명

첫 번째 규칙은 test 이름의 함수에 있는 처음 두 매개 변수를 다시 작성해야 한다고 지정합니다. 따라서 test 함수의 처음 두 매개 변수는 다시 작성됩니다. 두 번째 규칙은window.open 함수의 처음 매개 변수를 다시 작성해야 한다고 지정합니다. window.open 함수 내의 URL에는 이 함수 매개 변수를 포함한 페이지의 기본 URL과 게이트웨이 URL이 앞에 덧붙여집니다.