if -else 문과 switch문을 혼합한 형태로 다수의 조건문을 하나의 블럭에 처리할때 사용
<c:choose>
<c:when test="조건">
......
</c:when>
<c:when test="조건">
......
</c:when>
<c:otherwise>
.......
</c:otherwise>
</c:choose>
------------------------------------------------------------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<script type="text/xxjavascript">
function gosubmit()
{
var form = document.all.frm;
form.method="post";
form.action="chooseTest.jsp";
form.submit();
}
</script>
<body>
<form name="frm">
나이:<input type="text" name="age"/><br/>
<input type="button" value="전송" [안내]태그제한으로등록되지않습니다-xxonclick="gosubmit()"/>
</form>
</body>
</html>
---------------------------------------------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% request.setCharacterEncoding("euc-kr"); %>
<c:choose>
<c:when test="${param.age >= 18}">
성인이시군여
</c:when>
<c:otherwise>
미성년자이군여
</c:otherwise>
</c:choose>