2012-07-10 62 views
0

我正在檢索並將值設置爲一個值(數據)。將會話值設置爲jsp隱藏表單值

session.setAttribute("data", result.getBody().getData()); 

如何將會話的值設置爲表單值?路徑數據接受字符串值。

<td><form:input type="hidden" path="data" value="?"/></td> 

這可能嗎?我應該使用JSTL函數來成功嗎?

回答

1

試試如下(EL):

<form:input type="hidden" value="${sessionScope.data}"/>