{}
con.close();
}
catch (Exception e)
{}
%
jsp:forward page=view_message.jsp /
%
}
%
/body
/html
!-- index.html --
HTML
HEAD
TITLE message board /TITLE
/HEAD
BODY
TABLE width=90% align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=#88a6dd bordercolorlight=#88a6dd
TR
TD align=center bgcolor=#88a6dd 访客留言板/TD
/TR
TR
TDTABLE align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=#88a6dd bordercolorlight=#88a6dd
FORM ACTION=add_message.jsp
TR
TD姓名:/TD
TD bgcolor=#88a6dd input type=text name=name size=25/TD
/TR
TR
TD bgcolor=#88a6dd E-mail:/TD
TD bgcolor=#88a6dd input type=text name=mail size=25/TD
/TR
TR
TD主题:/TD
TD bgcolor=#88a6dd input type=text name=title size=25/TD
/TR
TR
TD valign=top bgcolor=#88a6dd 留言:/TD
TDtextarea name=content rows=7 cols=25/textarea/TD
/TR
TR
TD colspan=3TABLE align=center width=100% cellspacing=0 cellpadding=0 bordercolordark=#88a6dd bordercolorlight=#88a6dd
TR
TD align=center bgcolor=#88a6dd input type=submit value=https://www.04ip.com/post/提交留言 /TD
TD align=center a href=https://www.04ip.com/post/view_message.jsp font size=2查看留言/font/a/TD
TD align=center bgcolor=#88a6dd input type=reset value=https://www.04ip.com/post/重新填写 /TD
/TR
/TABLE/TD
/TR
/FORM
/TABLE/TD
/TR
/TABLE
/BODY
/HTML
HTML
HEAD
TITLE message board /TITLE
/HEAD
BODY
TABLE width=60% align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=#88a6dd bordercolorlight=#88a6dd
TR
TD align=center bgcolor=#88a6dd 访客留言板/TD
/TR
TR
TDTABLE align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=#88a6dd bordercolorlight=#88a6dd
FORM ACTION=add_message.jsp
TR
TD姓名:/TD
TD bgcolor=#88a6dd input type=text name=name size=25/TD
/TR
TR
TD bgcolor=#88a6dd E-mail:/TD
TD bgcolor=#88a6dd input type=text name=mail size=25/TD
/TR
TR
TD主题:/TD
TD bgcolor=#88a6dd input type=text name=title size=25/TD
/TR
TR
TD valign=top bgcolor=#88a6dd 留言:/TD
TDtextarea name=content rows=7 cols=25/textarea/TD
/TR
TR
TD colspan=3TABLE align=center width=100% cellspacing=0 cellpadding=0 bordercolordark=#88a6dd bordercolorlight=#88a6dd
TR
TD align=center bgcolor=#88a6dd input type=submit value=https://www.04ip.com/post/提交留言 /TD
TD align=center a href=https://www.04ip.com/post/view_message.jsp font size=2查看留言/font/a/TD
TD align=center bgcolor=#88a6dd input type=reset value=https://www.04ip.com/post/重新填写 /TD
/TR
/TABLE/TD
/TR
/FORM
/TABLE/TD
/TR
/TABLE
/BODY
/HTML
!--view_message.jsp--
%@ page import=java.sql.* %
HTML
HEAD
TITLE show the message in the table /TITLE
/HEAD
BODY
p align=center 所有访客留言/p
hr
%
try
{
Class.forName( sun.jdbc.odbc.JdbcOdbcDriver );
String url=jdbc:odbc:user_db ;
Connection con=DriverManager.getConnection(url, insher , insher );
Statement stm=con.createStatement();
ResultSet result=stm.executeQuery( select count(*) from message );
int message_count=0;
if(result.next())
{
message_count=result.getInt(1);
result.close();
}
if(message_count0)
{
result=stm.executeQuery( select * from message order by time desc );
while(result.next())
{
String title=result.getString( title );
String name=result.getString( name );
String mail=result.getString( mail );
推荐阅读
- 我的世界网易直播视频教程,我的世界如何直播
- 路由器千兆百兆怎么选择,路由器千兆百兆怎么选择好
- pdf如何转变成图片,pdf怎么能转换成图片
- python爬虫网易云课堂百度云,网易云课堂的python课程好不好知乎
- Go语言怎么天然支持并发 go语言并发之道 pdf
- chatGPT代写文章,文章代写工具
- 3a棋牌游戏手机的简单介绍
- 模拟游戏我的宠物生涯,模拟游戏我的宠物生涯怎么玩
- go语言prod运行方式 go语言 rune