<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.util.*" %>
<HTML>
<BODY bgcolor=cyan><Font size=1 >  
  <%!Hashtable hashtable=new Hashtable();
     public synchronized void putString(String s)
     { hashtable.put(s,s);
     }
  %>
  <%   String person_name=request.getParameter("name"),
              name_found=null;
         if(person_name==null)
             {person_name="";
             }
        byte b[]=person_name.getBytes("ISO-8859-1");
                 person_name=new String(b);
        name_found=(String)hashtable.get(person_name);
       if(name_found==null)
          { String person_email=request.getParameter("address");
              if(person_email==null)
                  {person_email="";
                  }
            StringTokenizer fenxi=new StringTokenizer(person_email,"  @");
            int n=fenxi.countTokens();
             if(n>=3)
                 {out.print("<BR>"+"你输入的Email有不合法字符");
                 }
             else
                { putString(person_name);
                  out.print("<BR>"+"您已经注册成功");
                  out.print("<BR>"+"您注册的名字是"+person_name);
                   
                }
          }
        else
          {out.print("<BR>"+"该名字已经存在，请您换个名字");
          }
  %>
</FONT>
</BODY>
</HTML>