页面无法注册
jsp代码:
register.jsp
<%@ page contentType= "text/html;charset=GB2312 " %>
<%@ page import= "tom.jiafei.Register " %>
<%!
public String codeString(String s)
{ String str=s;
try{ byte b[]=str.getBytes( "ISO-8859-1 ");
str=new String(b);
return str;
}
catch(Exception e)
{ return str;
}
}
%>
<html>
<body bgcolor= "#FFFF00 "> <font size=5>
<%@ include file= "head.txt " %>
<font size=1>
<br> 输入您的信息,会员名字不允许含有空格,带*号项必须填写。
<%
String str=response.encodeURL( "register.jsp ");
%>
<form action= " <%=str%> " method= "post ">
<br> 会员名称 <input type=text name= "logname "> *
设置密码 <input type=password name= "password "> *
<br> 性别(*) <input type=radio name= "sex " checked= "o " value= "男 "> 男
<input type=radio name= "sex " value= "女 " > 女
<br> 会员年龄 <input type=text name= "age " value= "0 "> *
电子邮件 <input type=text name= "email ">
<br> 联系电话 <input type=text name= "phone ">
通信地址 <input type=text name= "address ">
<br> 输入您的简介和交友要求
<br> <TextArea name= "message " rows= "4 " cols= "57 ">
</TextArea>
<br> <input type=submit name= "g " value= "提交 ">
</form>
<jsp:useBean id= "memberlogin " class= "tom.jiafei.Register " scope= "request ">
</jsp:useBean>
<%
String logname= " ",sex= " ",age= " ",password= " ",email= " ",phone= " ",address= " ",message= " ";
int n=0;
if(!(session.isNew()))
{ logname=request.getParameter( "logname ");
if(logname==null)
{ logname= " ";
}
logname=codeString(logname);
int space=logname.indexOf( " ");
if(space!=-1)
{ response.sendRedirect( "register.jsp ");
}
password=request.getParameter( "password ");
if(password==null)
&nb