求助!~~~

01831124 2004-05-08 08:17:56
本人现在用JSP做一个留言板,在运行文件PostMsg.jsp中,出现了下例错误:
500 Servlet Exception
Note: sun.tools.javac.Main has been deprecated.
/empty/PostMsg.jsp:15: Class _empty.FileWriter not found.
FileWriter fw = new FileWriter(path + "\\DataFile\\Message.inc", true);
^
/empty/PostMsg.jsp:15: Class _empty.FileWriter not found.
FileWriter fw = new FileWriter(path + "\\DataFile\\Message.inc", true);
^
/empty/PostMsg.jsp:18: Class _empty.BufferedWriter not found.
BufferedWriter bw = new BufferedWriter(fw);
^
/empty/PostMsg.jsp:18: Class _empty.BufferedWriter not found.
BufferedWriter bw = new BufferedWriter(fw);
^
Note: I:\jsp\doc\WEB-INF\work\_empty\_postmsg__jsp.java uses or overrides
a deprecated API. Recompile with "-deprecation" for details.
4 errors, 2 warnings
--------------------------------------------------------------------------------
Resin 2.1.4 (built Fri Aug 2 14:16


PostMsg.jsp文件其中一段代码:
001 <%@ page contentType="text/html; charset=GB2312"%>
002 <HTML>
003 <HEAD>
004 <TITLE>访客留言版</TITLE>
005 </HEAD>
006 <BODY>
007 <CENTER>
008 <FONT SIZE = 5 COLOR = blue>访客留言版</FONT>
009 </CENTER>
010 <HR>
011 <%
012 String path = request.getRealPath(".");
013 //取得目前目录在伺服端的实际位置
014
015 FileWriter fw = new FileWriter(path+ "\\DataFile\\Message.inc",true);
016 //建立FileWrite对象,设置由fw对象变量引用, 并以Append方式写入资料
017
018 BufferedWriter bw = new BufferedWriter(fw);
019 //建立BufferedWriter对象,并设置由bw对象变量引用
请教各位大哥大姐,这是怎么回事呀??
...全文
70 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧