<c:forEach var="tariff" items="${allTariffs}" varStatus="loop">
${tempId.add(tariff.tariffId)}
<c:if test="${contract.tariff==tariff}">
<input type="hidden" name="tariffId" value="${tempId.add(tariff.tariffId)}">
<script>
var tariffID = "${tempId.add(tariff.tariffId)}";
</script>
<script>
var array = new Array();
<c:forEach var="tariff" items="${allTariffs}" varStatus="loop">
array.push('${tempId.add(tariff.tariffId)}');
</c:forEach>
</script>