jsp mysql 留言版功能 哪位大侠手里有留言板块啊,发个给在下
jsp的用mysql做数据库的留言板块,界面无所谓,只要能实现留言(匿名和有名留言)以及权限高的管理者进行删除留言功能,完成这些即可,不用xml,感谢各位!
QQ:317195241
------解决方案--------------------
下个FCKeditor插件
然后导入到项目中
addMessage.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language="javascript" src="/online/js/validation-framework.js"></script>
<script language="javascript" src="/online/fckeditor/fckeditor.js"></script>
<title>无标题文档</title>
</head>
<body>
<div align="left">提交作业页面
</div>
<form id="form1" name="form1" method="post" action="/online/servlet/AddMessage">
<table width="402" height="315" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>姓名:</td>
<td><input name="name" type="text" id="name" size="40" /></td>
</tr>
<tr>
<td>老师:</td>
<td><input name="TID" type="text" id="TID" size="40" /></td>
</tr>
<tr>
<td>主题:</td>
<td><input name="title" type="text" id="title" size="40" /></td>
</tr>
<tr>
<td>内容:</td>
<td>
<script type="text/javascript">
var editor = new FCKeditor("content");
editor.BasePath='/online/fckeditor/';
editor.Height=400;
editor.width=200;
editor.ToolbarSet='Default';
editor.Create();
</script>
</td>
</tr>
<tr>
<td><input type="reset" name="reset" value="重设" /></td>
<td><input type="submit" name="Submit2" value="提交" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
addMessage.java:
package com.guestbook;
import
java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import
java.sql.SQLException;
import java.text.SimpleDateFormat;
import
javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class AddMessage extends HttpServlet {