<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ page contentType="text/html; charset=gb2312" %>
<jsp:useBean id="user" class="com.jspdev.ch3.TestBean"/>
<c:set value="24" target="${user}" property="age"/>
<c:set value="hellking" target="${user}" property="userName"/>
<c:set value="aaaaaa" target="${user}" property="password"/>
<html>
<head>
  <title>JSTL:自定义逻辑</title>
</head>
<body bgcolor="#FFFFFF">
<c:if test="${user.userName=='hellking'}">
   <c:choose>
    <c:when test="${user.age<=18}">
      <font color="blue">
    </c:when>
    <c:when test="${user.age<=30&&user.age>18}">
      <font color="red">
    </c:when>
    <c:otherwise>
      <font color="green">	
    </c:otherwise>	
  </c:choose>  
  <c:if test="${user.userName=='hellking'}">
         你作为管理员登录
  </c:if>
  </font>
</c:if>
</body>
</html>
