jsp中直接使用常量問題
無法直接在c標籤中直接同時使用jstl el標籤問題,解決方案如下:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%request.setAttribute("agentType", FinanceConstant.FINANCE_AGENT_TYPE);
request.setAttribute("openType", FinanceConstant.FINANCE_OPEN_TYPE);
%>
<c:choose>
<c:when test="${receive[1] == agentType }">aaa</c:when>
<c:when test="${receive[1] == openType }">bbb</c:when>
</c:choose>