SQL Server
add message into table String name=request.getParameter("name");
String mail=request.getParameter("mail");
String title=request.getParameter("title");
String content=request.getParameter("content");
if(name==null)
name="";
if(title==null)
title="";
if(content==null)
content="";
if(mail==null)
mail="";
if(name.length()==0)
out.println("留言人姓名不能为空!");
else if(title.length()==0)
out.println("留言主题不能为空!");
else if(content.length()==0)
out.println("留言内容不能为空!");
else
{
java.util.Date date=new java.util.Date();
String datetime=new Timestamp(date.getTime()).toString();