Sharing of jsp pages

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>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325021677&siteId=291194637