<c:choose>
<c:when test="${param.action=='1'}"><jsp:forward page="1.jsp"/></c:when>
<c:when test="${param.action=='2'}"><jsp:forward page="2.jsp"/></c:when>
<c:otherwise><jsp:forward page="1.jsp"/>0.jsp</c:otherwise>
</c:choose>
<c:when test="${param.action=='1'}"><jsp:forward page="1.jsp"/></c:when>
<c:when test="${param.action=='2'}"><jsp:forward page="2.jsp"/></c:when>
<c:otherwise><jsp:forward page="1.jsp"/>0.jsp</c:otherwise>
</c:choose>
本文探讨了一种使用<c:choose>标签实现基于参数条件的页面跳转逻辑的方法,详细解释了<c:when>和<c:otherwise>的用法,并通过示例展示了如何根据请求参数的不同将用户导向不同的页面。
8553

被折叠的 条评论
为什么被折叠?



