Vector 把你想存储的对象放到Vector内。用的时候去出来就可以了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 大虾能帮我看看下面的一段购物车小程序吗?好用给你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. 你都还没有setValue,怎么可以getValue呢??现在版本应该时用setAttribute()和getAttribute()吧??==================================================================注意:此人因发表爱国言论,被斑竹he*扣除6分信誉分,问你死未?! <%@ page import="java.util.*"%> 大家帮忙想想办法,如何从一篇文章中截取身份证号!!!!急急。。 求百分比机率排序(java) MyEclipse 编写JSP页面运行报错???代码没问题 救急!问一个关于JSF的问题! 类型转换 换行的问题,大家帮忙啊! The deference between <jsp:include page=""> and <jsp:formard page=""> 我又遇上问题咯,求助,在线等待,4点以前 在线等~求解答,用beanutils封装表单数据时遇到的问题 关于data-options动态修改内容 怎么取对数? 问一个javabean传递参数的问题(大侠救命!)
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.
现在版本应该时用setAttribute()和getAttribute()吧??
==================================================================注意:此人因发表爱国言论,被斑竹he*扣除6分信誉分,问你死未?!