choose、when、otherwise标签
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>choose、when、otherwise标签</title>
</head>
<body>
<%
pageContext.setAttribute("sum", 10);
%>
<c:choose>
<c:when test="${sum==10 }">
<h2>就是10、选对了</h2>
</c:when>
<c:when test="${sum != 10 }">
<h2>就是10、选对了</h2>
</c:when>
<c:otherwise>
<h2>没有满足的!</h2>
</c:otherwise>
</c:choose>
</body>
</html>