请高手指教.下面的程序哪里有问题?程序代码太长去后面验证部分代码
<html> <head>
<meta http-equiv="Content-Type" content="text/html" charset ="gb2312"> </head> <body> <%
request.setCharacterEncoding("gb2312");
String get_username="name";
Cookie temp = null;
Cookie[] cookies = request.getCookies(); //??Cookie??
int cookielen = cookies.length; //??Cookie???????
if(cookielen != 0)
{
for (int i = 0; i < cookielen; {
temp = cookies
if (temp.getName().equals("usercase"))
{ get_username= temp.getValue();
}
}
}if(!(get_username.equals("name")))
{
response.sendRedirect("haslog.jsp");
}
String username = request.getParameter("username");
if ( username == null ) {
username = "";
}
String email = request.getParameter("email");
if ( email == null ) {
email = "";
}
String realname = request.getParameter("realname");
if ( realname == null ) {
realname = "";
}
String company = request.getParameter("company");
if ( company == null ) {
company = "";
String phone = request.getParameter("phone");
if ( phone == null ) {
phone = "";
}
String cellphone = request.getParameter("cellphone");
if ( cellphone == null ) {
cellphone = "";
}
%>
<table width="778" height="303" align="center" bgcolor="#C5EBFE"> <form name="theForm" action="newuser" id="demo" method="post" onSubmit="return Validator.Validate(this,2)"> <tr>
<td colspan="4">
<table>
<tr>
<td width="645" bgcolor="#c5ebfe"><table>
<tr>
<td colspan="4"><table>
<tr>
<td width="645" bgcolor="#c5ebfe"><strong>ÇëÌîдÒÔÏÂ×¢²áÐÅÏ¢£¬*±ê×¢µÄ±íʾ±ØÐëÌîд </strong></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="153"> </td>
<td width="107"><div align="left"> Óû§Ãû <font size="2"><font color="#FF0000">*</font></font> £º </div></td>
<td><input name="username" value="<%=username%>" dataType ="Username" msg ="Óû§Ãû²»·ûºÏ¹æ¶¨£¨ËÄλÒÔÉÏÓ¢ÎÄ×ÖĸºÍÊý×Ö£©"> </td> <td> </td>
</tr> <tr>
<td> </td>
<td><div align="left"> ÃÜÂë <font size="2"><font color="#FF0000">*</font></font> £º </div></td>
<td><input name="password" dataType ="SafeString" msg ="ÃÜÂë²»·ûºÏ°²È«¹æÔò£¨ÁùλÒÔÉÏÓ¢ÎĺÍÊý×Ö£©" type="password"></td> <td> </td>
</tr>
<tr>
<td> </td>
<td><div align="left"> Öظ´£º </div></td>
<td><input name="password1" dataType ="Repeat" to ="Password" msg ="Á½´ÎÃÜÂ벻ƥÅä" type="password"></td> <td> </td>
</tr>
<tr>
<td> </td>
<td><div align="left"> ÕæʵÐÕÃû <font size="2"><font color="#FF0000">*</font></font> £º </div></td>
<td><input name="realname" type="text" value="<%=realname%>" dataType="Chinese" msg="ÕæʵÐÕÃûÇëÊäÈ뺺×Ö"></td>
<td> </td>
</tr> <tr>
<td> </td>
<td><div align="left"> µ¥Î»µØÖ·£º </div></td>
<td><textarea name="address" cols="35" rows="2" id="address"><%=address%></textarea></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="left"> µç»°£º </div></td>
<td><input name="phone" value="<%=phone%>" require ="false" dataType ="Phone" msg ="µç»°ºÅÂë²»ÕýÈ·"></td> <td> </td>
</tr> <tr>
<td> </td>
<td><div align="left"> ÊÖ»ú£º </div></td>
<td><input name="cellphone" value="<%=cellphone%>" require= "false" dataType= "Mobile" msg ="ÊÖ»úºÅÂë²»ÕýÈ·"></td> <td> </td>
</tr>
</tr> <tr>
<td colspan="2">
<div align="right"> </div>
<td width="275"><input name="Submit" type="submit" value="Ìá½»">
<input type="reset" name="Submit2" value="ÖØÖÃ">
<td width="223"> </tr> </form> </table> type Status reportmessage /newuserdescription The requested resource (/newuser) is not available.
--------------------------------------------------------------------------------Apache Tomcat/5.0.28
<html> <head>
<meta http-equiv="Content-Type" content="text/html" charset ="gb2312"> </head> <body> <%
request.setCharacterEncoding("gb2312");
String get_username="name";
Cookie temp = null;
Cookie[] cookies = request.getCookies(); //??Cookie??
int cookielen = cookies.length; //??Cookie???????
if(cookielen != 0)
{
for (int i = 0; i < cookielen; {
temp = cookies
if (temp.getName().equals("usercase"))
{ get_username= temp.getValue();
}
}
}if(!(get_username.equals("name")))
{
response.sendRedirect("haslog.jsp");
}
String username = request.getParameter("username");
if ( username == null ) {
username = "";
}
String email = request.getParameter("email");
if ( email == null ) {
email = "";
}
String realname = request.getParameter("realname");
if ( realname == null ) {
realname = "";
}
String company = request.getParameter("company");
if ( company == null ) {
company = "";
String phone = request.getParameter("phone");
if ( phone == null ) {
phone = "";
}
String cellphone = request.getParameter("cellphone");
if ( cellphone == null ) {
cellphone = "";
}
%>
<table width="778" height="303" align="center" bgcolor="#C5EBFE"> <form name="theForm" action="newuser" id="demo" method="post" onSubmit="return Validator.Validate(this,2)"> <tr>
<td colspan="4">
<table>
<tr>
<td width="645" bgcolor="#c5ebfe"><table>
<tr>
<td colspan="4"><table>
<tr>
<td width="645" bgcolor="#c5ebfe"><strong>ÇëÌîдÒÔÏÂ×¢²áÐÅÏ¢£¬*±ê×¢µÄ±íʾ±ØÐëÌîд </strong></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="153"> </td>
<td width="107"><div align="left"> Óû§Ãû <font size="2"><font color="#FF0000">*</font></font> £º </div></td>
<td><input name="username" value="<%=username%>" dataType ="Username" msg ="Óû§Ãû²»·ûºÏ¹æ¶¨£¨ËÄλÒÔÉÏÓ¢ÎÄ×ÖĸºÍÊý×Ö£©"> </td> <td> </td>
</tr> <tr>
<td> </td>
<td><div align="left"> ÃÜÂë <font size="2"><font color="#FF0000">*</font></font> £º </div></td>
<td><input name="password" dataType ="SafeString" msg ="ÃÜÂë²»·ûºÏ°²È«¹æÔò£¨ÁùλÒÔÉÏÓ¢ÎĺÍÊý×Ö£©" type="password"></td> <td> </td>
</tr>
<tr>
<td> </td>
<td><div align="left"> Öظ´£º </div></td>
<td><input name="password1" dataType ="Repeat" to ="Password" msg ="Á½´ÎÃÜÂ벻ƥÅä" type="password"></td> <td> </td>
</tr>
<tr>
<td> </td>
<td><div align="left"> ÕæʵÐÕÃû <font size="2"><font color="#FF0000">*</font></font> £º </div></td>
<td><input name="realname" type="text" value="<%=realname%>" dataType="Chinese" msg="ÕæʵÐÕÃûÇëÊäÈ뺺×Ö"></td>
<td> </td>
</tr> <tr>
<td> </td>
<td><div align="left"> µ¥Î»µØÖ·£º </div></td>
<td><textarea name="address" cols="35" rows="2" id="address"><%=address%></textarea></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="left"> µç»°£º </div></td>
<td><input name="phone" value="<%=phone%>" require ="false" dataType ="Phone" msg ="µç»°ºÅÂë²»ÕýÈ·"></td> <td> </td>
</tr> <tr>
<td> </td>
<td><div align="left"> ÊÖ»ú£º </div></td>
<td><input name="cellphone" value="<%=cellphone%>" require= "false" dataType= "Mobile" msg ="ÊÖ»úºÅÂë²»ÕýÈ·"></td> <td> </td>
</tr>
</tr> <tr>
<td colspan="2">
<div align="right"> </div>
<td width="275"><input name="Submit" type="submit" value="Ìá½»">
<input type="reset" name="Submit2" value="ÖØÖÃ">
<td width="223"> </tr> </form> </table> type Status reportmessage /newuserdescription The requested resource (/newuser) is not available.
--------------------------------------------------------------------------------Apache Tomcat/5.0.28
----------
很明显了