用resin作服务器,最简单的jsp程序为何无法运行?请帮忙??
一个很简单的jsp程序,如下:
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
Jsp1
</title>
</head>
<body>
<h1>
JBuilder Generated JSP
</h1>
<form method="post">
<br>Enter new value : <input name="sample"><br>
<br><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
</form>
</body>
</html>
可是输入:http://localhost:8080/jsp1.jsp时:
却出现:
500 Servlet Exception
/Jsp1.jsp:24: cannot resolve symbol
symbol : method setCharacterEncoding (java.lang.String)
location: interface javax.servlet.http.HttpServletRequest
request.setCharacterEncoding("GBK");
^
1 error
--------------------------------------------------------------------------------
Resin 2.1.8 (built Thu Mar 6 11:50:23 PST 2003)
请大家帮忙??