以上是jsp页面的代码,我是通过将从数据库获取到的所有商品封装到一个list集合中,使用request域存储数据,在jsp页面使用el获取的所有商品。我现在能否在这个基础上面实现点击商品,进入到本商品的详情界面,页面已经写好了。我自己的实现逻辑是:通过某个域存储商品的id信息,在servlet中获取到,去数据库中查找这件商品的所有信息,这个商品存这储到域空间中,在新的页面通过el获取,但是目前我无法实现将这个商品的id信息传存储到域空间中。我不知道这样能不能实现,是不是我的想法有错误,希望大神帮个忙!!!
<c:forEach items="${productList }" var="product">
<div class="col-md-2" style="height:250px">
<a href="product_info.htm">
<img src="${pageContext.request.contextPath }/${product.pimage }" width="170" height="170" style="display: inline-block;">
</a>
<p>
<a href="/WEB18/productOne" style='color: green'>${product.pname }</a>
</p>
<p>
<font color="#FF0000">商城价:¥${product.shop_price }</font>
</p>
</div>
</c:forEach>
上面是所有商品的jsp页面的代码。