java留言板_java实现简单留言板功能的代码实例

java实现简单留言板功能的代码实例

数据库对应的表:

guestbook:id ,name,phone,email,title,content,time;                   id

新建web project:guestbook

build Path:引入连接数据库的驱动的类库

在webRoot目录中加入:

+faceditor

+js

web.xml

代码:

xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

AddMessageServlet

webbook.guestbook.AddMessageServlet

GetMessagesServlet

webbook.guestbook.GetMessagesServlet

AddMessageServlet

/servlet/addMessage

GetMessagesServlet

/servlet/getMessages

addMessage.htm

代码:

add message

请您输入留言

查看留言

姓名:
E-Mail:
电话:
主题:
内容:

var oFCKeditor = new FCKeditor("content");

oFCKeditor.BasePath = '/guestbook/fckeditor/' ;

oFCKeditor.Height = 300 ;

oFCKeditor.ToolbarSet = 'Basic';

oFCKeditor.Create() ;

content.html

display content

留言内容

编号 12
姓名 liuwei
电话 2922266
email phpa@www.3ppt.com
主题 you can test
内容 test content!
编号  
姓名  
电话  
email  
主题  
内容  
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值