About using labels to judge the equality of two variables

In the process of doing the project, I encountered the need of paging, and I needed to switch the data by clicking the previous page and the next page, but if the current page is the first page, it is necessary to set the home page and the previous page as empty links. If the page is the last, it is similar, you need to set the last page and the next page as empty links. But there was a problem with the judgment.

1 1 <c:when test="${requestScope.pageBean.currentPage} == ${requestScope.pageBean.totalPage }">

It seems that there is no problem in writing it like this, but it is indeed not equal when judging. Later, I searched the Internet and finally changed it to this.

1 <c:when test="${requestScope.pageBean.currentPage == requestScope.pageBean.totalPage }">

Problems encountered during the project process, if you also encounter similar problems, I hope to help you.

Guess you like

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