大家帮忙看问题 struts2标签
刚刚学习,不明白的问题请大家帮忙啊!!
今天在struts2标签库上看到一段代码讲的if elseif else 标签,代码如下:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
<s:set name="age" value="29"></s:set>
<s:if test="${age>60}">老年</s:if>
<s:elseif test="${age>45}">中年</s:elseif>
<s:else>青年</s:else>
</body>
</html>
为什么我写过来报错?
今天在struts2标签库上看到一段代码讲的if elseif else 标签,代码如下:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
<s:set name="age" value="29"></s:set>
<s:if test="${age>60}">老年</s:if>
<s:elseif test="${age>45}">中年</s:elseif>
<s:else>青年</s:else>
</body>
</html>
为什么我写过来报错?
Messages: | |
File: | org/apache/jasper/compiler/DefaultErrorHandler.java |
Line number: | 40 |