限制响应时间的URL更改

时间:2011-10-24 07:54:05

标签: javascript jsp request response

目前我的应用程序网址显示在浏览器地址栏中。在我的页面上,我有一个指向外部网站的链接。当我点击它链接到他们的网站并返回响应链接/网址时,会重定向到我的网页。但此时网址已更改为本地路径,并在下一个程序中显示所有操作名称和令牌(查询)值。

例如:假设我的网址为http://www.testsecure.com,我会从此页面向某个外部网站发送请求并获取对我的重定向网址的响应。该重定向url是一个jsp页面,因此它被重定向并且url地址栏被更改为jsp文件路径。我需要限制这些事情。

我希望你能理解我的问题。如果您有任何澄清,我会更详细地解释。

Sapmle jsp:

<script type="text/javascript">
function formSubmit()
{
    document.newForm.submit();
}
</script>   
<bean:define name="newForm" property="sessionKey" id="sessionKey"/>
<bean:define name="newForm" property="FirstName" id="FirstName"/>
<bean:define name="newForm" property="LastName" id="LastName"/>
<bean:define name="newForm" property="Address1" id="Address1"/>
<bean:define name="newForm" property="AddressCity" id="AddressCity"/>
<bean:define name="newForm" property="Phone" id="Phone"/>
<bean:define name="newForm" property="payoutAmount" id="payoutAmount"/>
<bean:define name="newForm" property="Email" id="Email"/>
<bean:define name="newForm" property="AddressZip" id="AddressZip"/>
<bean:define name="newForm" property="AddressState" id="AddressState"/>
<bean:define name="newForm" property="AddressCountry" id="AddressCountry"/>
<form name="newForm" action="https://www.debitway.ca/process/index.php" method="POST">  
    <input type="hidden" name="sessionKey">
    <input type="hidden" name="xpin">
    <input type="hidden" name="FirstName">
    <input type="hidden" name="LastName">
    <input type="hidden" name="Address1">
    <input type="hidden" name="AddressCity">
    <input type="hidden" name="Phone">
    <input type="hidden" name="payoutAmount">
    <input type="hidden" name="Email">
    <input type="hidden" name="Phone">
    <input type="hidden" name="AddressState">
    <input type="hidden" name="AddressZip">
    <input type="hidden" name="AddressCountry"> 
    <input type="hidden" name="return_url" value="http://testsecure/ResponsePage.jsp">
    <input type="hidden" name="first_name" value="<%=FirstName%>"/>
    <input type="hidden" name="last_name" value="<%=LastName%>"/>
    <input type="hidden" name="email" value="<%=Email%>"/>
    <input type="hidden" name="phone" value="4574745745745474"/>    
    <input type="hidden" name="item_code" value="<%=sessionKey%>"/>
    <input type="hidden" name="custom" value="321">
    <input type="hidden" name="shipment" value="no">
    <input type="hidden" name="address" value="hdhdhd">
    <input type="hidden" name="city" value="hfdhfd">
    <input type="hidden" name="state_or_province" value="fhdhfd">
    <input type="hidden" name="zip_or_postal_code" value="64646">
    <input type="hidden" name="country" value="<%=AddressCountry%>">    
</form>
<Script>
    formSubmit();
</Script>

在这个jsp中,我有return_url参数。这是获得回复后的返回网址。在请求发送之前,我的网址为http://www.testsecure.com。如果我正在对我的应用程序中的所有操作进行处理,它将保持不变。但是对于这部分,我的网址在收到响应后会改变为“http://testsecure/ResponsePage.jsp”..我需要避免这个网址更改。即使得到回应也需要保持我的网址为“http://www.testsecure.com”。这可能吗?

0 个答案:

没有答案