c:if标签的问题
技术科 2008-08-01 03:01:25 <%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!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>
<c:if test="${pageContext.request.method=='post'}">
<c:choose>
<c:when test="param.favor=='computer'">
Fav is <b>computer</b>
</c:when>
<c:otherwise>
Fav is <b>other</b>
</c:otherwise>
</c:choose>
</c:if>
<form method="post">
What?
<br>
<input type="text" name="favor">
<input type="submit" value="提交">
</form>
</body>
</html>
这段代码运行后,在文本框中输入任何值都没反应,红色部分提示:"Invalid character constant",请教如何解决?