亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

jsp頁面用el jstl輸出不了

jsp頁面用el jstl輸出不了

fenkapian 2016-08-14 10:02:33
代碼如下,用注釋掉的Java小腳本就能輸出,好像應該叫JSP腳本。麻煩各位給我看看用el和jstl為什么不能輸出,哪里錯了。<%@page import="cn.pb.news.entity.Bill"%><%@page import="java.util.List"%><jsp:useBean id="billService" class="cn.pb.news.service.impl.BillServiceImpl" scope="page"/><%@ page language="java" contentType="text/html; charset=UTF-8"??? pageEncoding="UTF-8"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link type="text/css" rel="stylesheet" href="../css/style.css"/><title>Insert title here</title></head><body>?? ?<div class="menu">?? ?<form method="get" action="">?? ??? ?商品名稱:<input type="text" name="productName" class="input-text" />&nbsp;&nbsp;&nbsp;&nbsp;?? ??? ?是否付款:<select name="payStatus">?? ??? ??? ?<option value="">請選擇</option>?? ??? ??? ?<option value="1">已付款</option>?? ??? ??? ?<option value="0">未付款</option>?? ??? ?</select>&nbsp;&nbsp;&nbsp;&nbsp;?? ??? ?<input type="submit" name="submit" value="組合查詢" class="button" />?? ?</form></div><div class="main">?? ?<div class="optitle clearfix">?? ??? ?<em><input type="button" name="button" value="添加數據" class="input-button" onclick="location.href='modify.jsp'" /></em>?? ??? ?<div class="title">賬單管理&gt;&gt;</div>?? ?</div>?? ?<div class="content">?? ??? ?<table class="list">?? ??? ??? ?<tr>?? ??? ??? ??? ?<td>賬單編號</td>?? ??? ??? ??? ?<td>商品名稱</td>?? ??? ??? ??? ?<td>商品數量</td>?? ??? ??? ??? ?<td>交易金額</td>?? ??? ??? ??? ?<td>是否付款</td>?? ??? ??? ??? ?<td>供應商名稱</td>?? ??? ??? ??? ?<td>商品描述</td>?? ??? ??? ??? ?<td>賬單時間</td>?? ??? ??? ?</tr>?? ??? ??? ?<%// ?? ??? ??? ??? ?BillService billService = new BillServiceImpl();?? ??? ??? ??? ?List<Bill> billList = billService.getBillList();// ?? ??? ??? ??? ?for(Bill bill : billList) {?? ??? ??? ??? ?request.setAttribute("billList", billList);?? ??? ??? ?%>?? ??? ??? ?<c:forEach items="${requestScope.billList }" var="bill">?? ??? ??? ??? ?<tr><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getId()%></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getProductName()%></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getCounts() %></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getBillMoney() %></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getIsPay() %></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getProductName() %></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getProductDesc() %></td> --><!-- ?? ??? ??? ??? ??? ?<td><%=bill.getBillTime() %></td> -->?? ??? ??? ??? ??? ?<td>${bill.Id }</td>?? ??? ??? ??? ??? ?<td>${bill.productName }</td>?? ??? ??? ??? ??? ?<td>${bill.counts }</td>?? ??? ??? ??? ??? ?<td>${bill.billMoney }</td>?? ??? ??? ??? ??? ?<td>${bill.isPay }</td>?? ??? ??? ??? ??? ?<td>${bill.productName }</td>?? ??? ??? ??? ??? ?<td>${bill.productDesc }</td>?? ??? ??? ??? ??? ?<td>${bill.billTime }</td>?? ??? ??? ??? ?</tr>?? ??? ??? ?</c:forEach><!-- ?? ??? ??? ?<tr> --><!-- ?? ??? ??? ??? ?<td><%=bill.getId()%></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getProductName()%></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getCounts() %></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getBillMoney() %></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getIsPay() %></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getProductName() %></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getProductDesc() %></td> --><!-- ?? ??? ??? ??? ?<td><%=bill.getBillTime() %></td> --><!-- ?? ??? ??? ?</tr> --><!-- ?? ??? ??? ?<% --><!-- ?? ??? ??? ??? ?} --><!-- ?? ??? ??? ?%> -->?? ??? ?</table>?? ?</div></div></body></html>
查看完整描述

2 回答

?
慕大叔

TA貢獻75條經驗 獲得超103個贊

jsp頁面盡量少出現java代碼,后臺直接傳 一個list過來。

查看完整回答
反對 回復 2016-08-15
?
fenkapian

TA貢獻18條經驗 獲得超1個贊


foreach標簽里用out標簽輸出也不行,還是錯的

查看完整回答
反對 回復 2016-08-14
  • 2 回答
  • 0 關注
  • 2253 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號