【新手求助】实现商品收藏的功能。。
下面是我在Jsp页面写的一段代码,每条phone信息后面对应一个收藏按钮
<%
List<Cellphone> al = new ArrayList<Cellphone>();
CellphoneDAOImpl cl = new CellphoneDAOImpl();
al = cl.getList();
Iterator<Cellphone> iter = al.iterator();
while(iter.hasNext())
{
Cellphone p = (Cellphone)iter.next();
int phoneID = p.getPhoneID();
out.println(p.getPhoneModel()+" " + p.getBrand()+" "+p.getDescription()+" "+ p.getPrice());
out.println("<input type=button value=收藏 onclick= clickHander() > ");
out.println("<br/>");
}
%>
有个问题:怎么实现点击收藏按钮的时候 将商品id存到collection那个表里面。。