i have a problem to format time in Localdatetime pass from servlet to jsp. Here its my code:
<c:forEach items="${listDeviceType}" var="deviceType">
<tbody>
<tr>
<td>${deviceType.ID}</td>
<td>${deviceType.name}</td>
<td>
<%
LocalDateTime stopTime = deviceType.getStopTime();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
String formattedStopTime = stopTime.format(formatter);
%>
</td>
<td>${deviceType.startTime}</td>
<td>${deviceType.resetTime}</td>
<td>
<a href="admin-devicetypeedit?dTID=${deviceType.ID}" class="badge rounded-pill bg-primary">
<i class="fa fa-edit"></i>
Edit
</a>
<form action="admin-devicetypedelete" method="POST" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="dTID" value="${deviceType.ID}">
<button type="submit" class="badge rounded-pill bg-danger">
<i class="fa fa-trash-o">Delete</i>
</button>
</form>
</td>
</tr>
</tbody>
</c:forEach>
But i show "deviceType cannot be resolved"
Can you help me/Thanks for all