WEB开发网:下面我们开始建立留言的页面! <%@page import ="java.util.*" import ="java.text.*" import="java.sql.*" import ="j
赞助商链接
中资源
>> 最新文章
>> 赞助商
>> 热门文章
WEB开发网文章阅读

如何使用JSP+MySQL创建留言本(三)

作者:未知 文章来源:WEB开发者 更新时间:2008-2-29 14:23:41
下面我们开始建立留言的页面!
<%@page
import ="java.util.*"
import ="java.text.*"
import="java.sql.*"
import ="java.io.*"
import ="java.lang.*"
contentType="text/html; charset=gb2312"
%>
<%
class CommentError// throws java.lang.NullPointerException
{ public String Username="",Sex="",Address="",Postal="",Oicq="",Icq="",Tel="",Comment="";
public boolean NoError=true;//false;
public int ErrorCount=0;
private boolean IsNumber(String s1) {}
public String font (String se) {}
public String Comment_Er(String se) {}
public void Username (String se) {}
public void Sex (String se) {}
public void Address (String se) {}
public void Comment (String se) {}
public void Tel (String se) {}
public void Postal (String se) {}
public void Oicq (String se) {}
public void Icq (String se) {}
}
class FormatComment
{ public String Replace(String source, String oldString, String newString) {}
public String formatint(String se) {}
public String fromatcomment(String se) {}
public String toHtmlInput(String str) {}
public String toHtml(String str) {}
public String toSql(String str) {}//转换为可以加入Myqal的格式
}

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>使用MySQL(和PHP搭配之最佳组合)数据库</title>
</head>

<body>

<p align="center"><center><font style="COLOR: blue; FONT-FAMILY: 方正舒体,华文行楷,隶书,宋体; FONT-SIZE: 16pt">萍慧jsp(SUN企业级应用的首选)留言薄</font></center></p>
<p align="center">

<%! String username,sex,address,post,oicq,icq,telnumber,comment,email,url.urltitle;
%>
<%
try{ username=request.getParameter("name");
}catch (NullPointerException e){ username="";}
                           
try{ comment=request.getParameter("comment");
}catch (NullPointerException e){ comment="";}
                           
try{ sex=request.getParameter("sex");
}catch (NullPointerException e){ sex="";}
                           
try{ address=request.getParameter("address");
}catch (NullPointerException e){ address="";}
                           
try{ post=request.getParameter("postal");
}catch (NullPointerException e){ post="";}
                           

[1] [2] [3] [4] [5]  下一页

百度搜索中共有相关主题
[阅读:次] [返回上一页] [打 印]
  • 相关文章
  • 本类热门