在a.jsp中String[] temp=request.getparameterValues("aaa");
request.setAttribute("temp",temp);
转发到b.jsp时
String tt[]=(String[])request.getattribute("temp");for(int i=0;i<tt.lenth;i++){System.out.println(tt[i]);}
这样写问题出在哪,应怎样改正?提示错误是不能引用tt.length

解决方案 »

  1.   

    为什么用数组呀?用String直接存字符串就可以了,用数组作什么?
      

  2.   

    你是怎么转到b页面的?
    普通的表单提交是不行的
    在我的映象中是通过RequestDispatcher.forward跳转才能接收到
    request.setAttribute设置的参数
      

  3.   

    String[] temp=request.getparameterValues("aaa");是接受另外一个页面传过来的所有复选框的值,然后通过<jsp:forward>标签调到b.jsp中,想在b.jsp中显示所有复选框的值