1.数组的当然不是这么取的了,最好写在一个method里面,然后作为参数传过来,最后再一个一个的取出来.2.数组是不能这样比较的,应该用循环一个元素一个元素比较,

解决方案 »

  1.   

    tomtian,能不能说的详细一点啊!
      

  2.   

    String Name=getParameter("NAME");//什么意思?
    是request.getParameter("name")吗?
    request.getParameter只能取字符串形式的参数,所以如果你是字符串数组的话,你需要用一个分隔符把所有字符串合并成一个字符串传过来,然后再分解合并后的字符串
    如果不是字符串数组,另一种办法是用session.setAttribute()和session.getAttribute()方法,把整个数组作为一个对象,用session来传递,如:
    session.setAttribute("theArray",theArray);
    ArrayClass[] otherArray = (ArrayClass[])session.getAttribute("theArray");
      

  3.   

    我的本意是将web页中的参数取到applet中做进一步处理!
    楼上的,session可以用在applet中吗?
      

  4.   

    tomtian(老猫) 的方法可以了。
      

  5.   

    如果是从表单提交过来的,可以用以下方法,取出来即为字符串数组:
      String[] sCatalogID=null;
      int iCatalogID=Integer.MAX_VALUE;
      if(request.getParameter("CatalogID")!=null)
      {
        sCatalogID=request.getParameterValues("CatalogID");
      }可通过以下方法调用数组的每一项:
      for(int i=0;i<sCatalogID.length;i++)
      {
        iCatalogID=Integer.parseInt(sCatalogID[i]);
      }