把你想存储的对象放到Vector内。用的时候去出来就可以了。

解决方案 »

  1.   

    大虾能帮我看看下面的一段购物车小程序吗?好用给你40分
    Vector shop=(Vector)session.getValue("shop");
    if(shop==null)
    {
      shop=new Vector();
    }
    else
    {
    for(int i=0;i<shop.size();i++)
     {
        buyList list=(buyList)shop.elementAt(i);
        if(list.pid==myList.pid)
          {list.number++;
           shop.setElementAt(list,i);
           listFlag=false;
           }
      }
    }
    if(listFlag)shop.addElement(myList);
    session.putValue("shop",shop);
    提示错误为Class org.apache.jsp.Vector not found.
      

  2.   

    你都还没有setValue,怎么可以getValue呢??
    现在版本应该时用setAttribute()和getAttribute()吧??
    ==================================================================注意:此人因发表爱国言论,被斑竹he*扣除6分信誉分,问你死未?!
      

  3.   

    <%@ page import="java.util.*"%>