<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.util.*" %>
<HTML>
 <BODY BGCOLOR=cyan><FONT Size=1>
  <P> 请输入三角形的三个边的长度,输入的数字用逗号分割:
  <BR>
  <FORM action="Example2_1.jsp" method=post name=form>
  <INPUT type="text" name="boy"> 
  <INPUT TYPE="submit" value="送出" name=submit>
  </FORM>  
      <%! double a[]=new double[3];
          String answer=null;
      %>
      <% int i=0;
         boolean b=true;
         String s=null;
         double result=0;
         double a[]=new double[3];
         String answer=null;
         s=request.getParameter("boy");
            if(s!=null)
               { StringTokenizer  fenxi=new StringTokenizer(s,",,");
                 while(fenxi.hasMoreTokens())
                     { String temp=fenxi.nextToken();
                       try{ a[i]=Double.valueOf(temp).doubleValue();
                              i++;
                           }
                      catch(NumberFormatException e)
                         {out.print("<BR>"+"请输入数字字符");
                         }
                      }
              if(a[0]+a[1]>a[2]&&a[0]+a[2]>a[1]&&a[1]+a[2]>a[0]&&b==true)
                 { double p=(a[0]+a[1]+a[2])/2;
                   result=Math.sqrt(p*(p-a[0])*(p-a[1])*(p-a[2]));
                   out.print("面积:"+result);
                 }    
             else
                {answer="您输入的三边不能构成一个三角形";
                   out.print("<BR>"+answer);
                }
          }   
      %> 
   <P> 您输入的三边是:
       <BR>
           <%=a[0]%>
        <BR>
          <%=a[1]%>
        <BR>
          <%=a[2]%>
 </BODY>
</HTML>
就是new StringTokenizer(s,",,");中的",,"参数是什么意思,感谢,代表什么?