我使用的是帶有Spring webflow和spring mvc的thymeleaf。我正試圖通過 flowExecutionUrl
獲得應用程序URL。但是,當我在跨度打印flowExecutionUrl
我收到的網址就是喜歡flowExecutionUrl在thymeleaf中使用th:action標籤時追加兩次
/SWF/loginflow.htm?execution=e2s1
,但是當我通過相同的th:action
我的項目名稱得到了附加的兩倍。像下面這個
/SWF/SWF/loginflow.htm?execution=e2s1
是我的代碼
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring3-3.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<body>
<div>
<div style="width: 1330px; height: 100px;">
<div id="header" th:include="'/header'::headerfream"></div>
</div>
<div style="width: 1330px; height: 500px; position: absolute; top: 110px;">
<form action = "#" th:action="@{${flowExecutionUrl}}" method="POST">
<div>
<table>
<tr><td><span th:text="${flowExecutionUrl}"></span></td></tr>
<tr>
<td>
<p>User Name</p>
</td>
<td>
<input type="text" name="name" id="name" />
</td>
</tr>
<tr>
<td>
<p>Password</p>
</td>
<td>
<input type="password" name="password" id ="password" />
</td>
</tr>
<tr>
<td>
<input type="submit" value="submit"/>
</td>
</tr>
</table>
</div>
</form>
</div>
</div>
</body>
</html>