We often want a web page to display different data based on different requests.
The method is to add a variable to the session to distinguish different request types according to different values.
后台:
request.getSession().setAttribute("ordId",1);
jsp:
<c:if test="${ordId==1}">
<ul>
<li>Order Name: ${order.orderName}</li>
<li>Order ID: ${order.id}</li>
<li>Order ID Total Amount: ${order.totalPrice} </li>
<li>Order time: <fmt:formatDate value="${order.byTime}" pattern="yyyy-MM-dd HH:mm:ss"/></li>
</ul>
< /c:if>