用resin作服务器,最简单的jsp程序为何无法运行?请帮忙??

cenlink cenlink 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
一个很简单的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)

请大家帮忙??
...全文
评论 19
收藏 已收藏
分享
返回顶部
cenlink
Web 开发 81,108 成员 341,721 内容