A
A
artshelom2017-04-08 21:20:28
Java
artshelom, 2017-04-08 21:20:28

How to perform an action in a jsp file?

Using spring mvc, I send an object of type int or long, but how in jsp in this code to subtract it, add it, etc...

<c:forEach items="${int}" var="int">
               ${int.a}-${int.b}
</c:forEach>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Baranenko, 2017-04-08
@artshelom

If I understand correctly, then

<c:forEach items="${int}" var="int">
           <c:set var="Amount" value="${int.a+int.b}" />
 <c:set var="difference" value="${int.a-int.b}" />
</c:forEach>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question