Nick Robertson
Nick Robertson

Reputation: 1047

set a session value to jsp hidden form value

I'm retrieving and set into a session a value(data).

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

How can i set the value of the session into the form value? The path data accepts String values.

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

Is this possible? Should i use a JSTL function to succeed this?

Upvotes: 0

Views: 3060

Answers (1)

Bhesh Gurung
Bhesh Gurung

Reputation: 51030

Try something as follows (with EL):

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

Upvotes: 1

Related Questions