救急呀——————救急呀——JAVABEAN调用问题
http://luoye1979414.vicp.net:8080/jsp-examples/tomwen/index.jsp
点击“注册”
然后输入注册信息在点击确定,然后出错!急急急急急急急急急急急急急急急急急
register.jsp代码如下
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ include file="include.inc"%>
<%@ include file="trans.jsp"%>
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="error.jsp" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><LINK
href="hellking.css" type=text/css rel=stylesheet>
<body>
<table width=88% border="1" height="100%" cellpadding="0" cellspacing="0" align="left" bordercolor="#000080" class=tablebody2>
<tr>
<td>
<script language="javascript">
<!-- Begin validation script
function checkId(o){
if(o.value!="")
for(i=0;i<o.value.length;i++){
if(!((o.value.charCodeAt(i)>=48&&o.value.charCodeAt(i)<=57)||(o.value.charCodeAt(i)>=65&&o.value.charCodeAt(i)<=90)||(o.value.charCodeAt(i)>=97&&o.value.charCodeAt(i)<=122)))
{
alert("ID只能由字母和数字组成!");
o.focus();
break;
}
}
}
function checkConfirm(o1,o2){
if(o2.value!=""){
if(o2.value!=o1.value){
alert("两次输入的密码必须相同!");
o1.focus();
}
}
}
function checkform2(){
if(document.form2.name.value==""){
alert("请输入姓名!");
return false;
}
else if(document.form2.pinyin.value==""){
alert("请输入姓名的拼音!");
return false;
}
else if(document.form2.no.value==""){
alert("请输入员工号码!");
return false;
}
else if(document.form2.id.value==""){
alert("请输入用户名!");
return false;
}
else if(document.form2.psw.value==""){
alert("请输入密码!");
return false;
}
else if(document.form2.repsw.value!=document.form2.psw.value){
alert("请正确输入密码");
return false;
}
else
return true;
}
// End of validation script -->
</script><script language="JavaScript">
<!--
function RgTest()
{
if(document.form1.userid.value=="")
{
window.alert("请输入用户名名称!");
document.form1.resource.focus();
return false;
}
if(document.form1.name.value=="")
{
window.alert("请输入真实姓名!");
document.form1.userid.focus();
return false;
}
if(document.form1.street.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.city.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.state.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.zipCode.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.phone.value=="")
{
window.alert("请完整输入信息!");
document.form1.phone.focus();
return false;
}
if(document.form1.email.value=="")
{
window.alert("请完整输入信息!");
document.form1.email.focus();
return false;
}
if(document.form1.cardNumber.value=="")
{
window.alert("请完整输入信息!");
document.form1.cardNumber.focus();
return false;
}
if(document.form1.password.value!=document.form1.confirmpassword.value)
{
window.alert("请正确输入密码!");
document.form1.password.focus();
return false;
}
return true;
}
//-->
</script>
<%
String userid = request.getParameter("userid");
if ( userid == null ) {
userid = "";
}
String email = request.getParameter("email");
if ( email == null ) {
email = "";
}
String name = request.getParameter("name");
if ( name == null ) {
name = "";
}
String phone = request.getParameter("phone");
if ( phone == null ) {
phone = "";
}
String street = request.getParameter("street");
if ( street == null ) {
street = "";
}
String city = request.getParameter("city");
if ( city == null ) {
city = "";
}
String state = request.getParameter("state");
if ( state == null ) {
state = "";
}
String zipCode = request.getParameter("zipCode");
if ( zipCode == null ) {
zipCode = "";
}
String cardNumber = request.getParameter("cardNumber");
if ( cardNumber == null ) {
cardNumber = "";
}
String errorMessage = request.getParameter("errorMessage");
%>
<%
if ( errorMessage != null ) {
%>
<span class="headingred">
<%=errorMessage%>
</span>
<br>
<%
}
%>
<form method="post" action="newuser.jsp" name="form1">
<table border="0" cellspacing="0" cellpadding="0" width="500">
<tr><td colspan="6"><IMG height=10 alt="" src="images/spacer.gif" width=1 border=0></td></tr>
<tr>
<td align="right"><IMG height=18 alt="" src="images/titlebar_left.gif" width=6 border=0></td>
<td background="images/titlebar_stretch.gif" valign="center"></td>
<td background="images/titlebar_stretch.gif" valign="center"></td>
<td background="images/titlebar_stretch.gif" valign="center"></td>
<td background="images/titlebar_stretch.gif" align="right" valign="center"></td>
<td><IMG height=18 alt="" src="images/titlebar_right.gif" width=6 border=0></td>
</tr>
<tr><td colspan="6"><IMG height=10 alt="" src="images/spacer.gif" width=1 border=0></td></tr>
<tr>
<td> </td>
<td> </td>
<td>用户名:</td>
<td><input size="15" name="userid" value=<%=userid%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr><td colspan="6"><IMG height=3 alt="" src="images/spacer.gif" width=1 border=0></td></tr>
<tr>
<td> </td>
<td> </td>
<td>密码:</td>
<td><input type="password" size="15" name="password"></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>确认密码:</td>
<td><input type = "password" size="15" name="confirmpassword"></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>