web開發:使用mvc的方式來完成查詢商品,並回顯資料庫查詢的信息

商城價:¥${product.shop_price }

//獲得集合ListList productList = (List)request.getAttribute("productList");if(productList!=null){for(Product product : productList){out.write("
");out.write(" ");out.write("

");out.write("

商城價:¥"+product.getShop_price()+"

");out.write("
");}}%> --%>

瀏覽記錄

web開發:使用mvc的方式來完成查詢商品,並回顯數據庫查詢的信息

圖片地址最好寫全局地址,這裡注意一點product.pimage是數據庫存好的,地址為products/1/c_0001.jpg,圖片必須要存在

web開發:使用mvc的方式來完成查詢商品,並回顯數據庫查詢的信息

這個位置,不然圖片獲取不到,也就是說當插入數據的時候,圖片的位置就固定了


分享到:


相關文章: