1

我知道有一个 Spring 重定向功能,但有谁知道您是否可以 POST 到外部 URL,然后加载该页面?

我想在 Spring 中重新创建此功能:

http://jsfiddle.net/bk64U/2/:在我的浏览器中使用这个表单,我将我的数据发布到一个外部 URL,我的浏览器将我导航到那个 URL。我想在 Spring 中执行此操作,而不使用任何 HTML/Javascript/AJAX/等。有谁知道这是否可能?

进一步说明:POST 必须实际将用户重定向到表单操作中指定的页面。显示一个空白页面,或者仅仅获得 http 响应是不够的。

<html>
<head> <title> Something Token Request</title> </head>
<body>
<h2> Something Token Request</h2>
<form action=https://some.external.com/site/whatever.php method="POST">
<table align=center border=1>
<tr>
<td> custid </td>
<td> <input type=text name=custid value="someuserid"> </td>
<td> This is your Something custid (required) </td>
</tr>
<tr>
<td> password </td>
<td> <input type=password name=password value="somepassword"> </td>
<td> This is your Something password (required) </td>
</tr>
</table>
<input type="submit" value="Submit">
</form>
</body>
</html>
4

0 回答 0