第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

Property 'command' not found on type java.lang.String?這個錯誤是為什么?

<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@?taglib?prefix="c"?uri="http://java.sun.com/jsp/jstl/core"%>
<%@?page?language="java"?import="java.util.*"?contentType="text/html;?charset=utf-8"%>
<%
String?path?=?request.getContextPath();
String?basePath?=?request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html?xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta?http-equiv="Content-Type"?content="text/html;?charset=UTF-8"?/>
		<meta?http-equiv="X-UA-Compatible"content="IE=9;?IE=8;?IE=7;?IE=EDGE"?/>
		<title>內(nèi)容列表頁面</title>
		<link?href="<%=basePath?%>resources/css/all.css"?rel="stylesheet"?type="text/css"?/>
	</head>
	<body?style="background:?#e1e9eb;">
		<form?action=""?id="mainForm"?method="post">
			<div?class="right">
				<div?class="current">當(dāng)前位置:<a?href="javascript:void(0)"?style="color:#6E6E6E;">內(nèi)容管理</a>?&gt;?內(nèi)容列表</div>
				<div?class="rightCont">
					<p?class="g_title?fix">內(nèi)容列表?<a?class="btn03"?href="#">新?增</a>&nbsp;&nbsp;&nbsp;&nbsp;<a?class="btn03"?href="#">刪?除</a></p>
					<table?class="tab1">
						<tbody>
							<tr>
								<td?width="90"?align="right">演示字段1:</td>
								<td>
									<input?type="text"?class="allInput"?value=""/>
								</td>
								<td?width="90"?align="right">演示字段2:</td>
								<td>
									<input?type="text"?class="allInput"?value=""/>
								</td>
	????????????????????????????<td?width="85"?align="right"><input?type="submit"?class="tabSub"?value="查?詢"?/></td>
	???????					</tr>
						</tbody>
					</table>
					<div?class="zixun?fix">
						<table?class="tab2"?width="100%">
							<tbody>
								<tr>
								????<th><input?type="checkbox"?id="all"?onclick=""/></th>
								????<th>序號</th>
								????<th>指令名稱</th>
								????<th>描述</th>
								????<th>操作</th>
								</tr>
								<c:forEach?items="messageList"?var="message"?varStatus="status">

									<tr?<c:if?test="${status.index+1}%2!=0">style='background-color:#ecf6ee;'</c:if>>
									<td><input?type="checkbox"?/></td>
									<td>${status.index+1}</td>
									<td>${message.command}</td>
									<td>${message.description}</td>
									<td>
										<a?href="#">修改</a>&nbsp;&nbsp;&nbsp;
										<a?href="#">刪除</a>
									</td>
								</tr>
								</c:forEach>
							</tbody>
						</table>
						<div?class='page?fix'>
							共?<b>4</b>?條
							<a?href='###'?class='first'>首頁</a>
							<a?href='###'?class='pre'>上一頁</a>
							當(dāng)前第<span>1/1</span>頁
							<a?href='###'?class='next'>下一頁</a>
							<a?href='###'?class='last'>末頁</a>
							跳至&nbsp;<input?type='text'?value='1'?class='allInput?w28'?/>&nbsp;頁&nbsp;
							<a?href='###'?class='go'>GO</a>
						</div>
					</div>
				</div>
			</div>
	????</form>
	</body>
</html>
package?bean;
//與消息表對應(yīng)的實(shí)體類
public?class?Message?{
	private?int?id;
	private?String?command;
	private?String?description;
	private?String?content;
	public?int?getId()?{
		return?id;
	}
	public?void?setId(int?id)?{
		this.id?=?id;
	}
	public?String?getCommand()?{
		return?command;
	}
	public?void?setCommand(String?command)?{
		this.command?=?command;
	}
	public?String?getDescription()?{
		return?description;
	}
	public?void?setDescription(String?description)?{
		this.description?=?description;
	}
	public?String?getContent()?{
		return?content;
	}
	public?void?setContent(String?content)?{
		this.content?=?content;
	}
}

按照老師的代碼敲的,為什么還會報錯?

type?Exception report

message?javax.el.PropertyNotFoundException: Property 'command' not found on type java.lang.String

description?The server encountered an internal error that prevented it from fulfilling this request.


正在回答

6 回答

?<c:forEach?items="messageList"?var="message"?varStatus="status"> 這行錯了 取messageList 要用el表達(dá)式取 ${messageList}?? 否則只是個String對象? message?javax.el.PropertyNotFoundException: Property 'command' not found on type java.lang.String ? 屬性找不到異常 意思是String 沒有 command 這個屬性?? 看到異常? 自己要會解析翻譯

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

二道橋十三太保 提問者

講的很好
2017-04-04 回復(fù) 有任何疑惑可以回復(fù)我~

我也是

0 回復(fù) 有任何疑惑可以回復(fù)我~

我的也是這個問題


0 回復(fù) 有任何疑惑可以回復(fù)我~

樓主解決了嗎?我也遇到了這個問題,求解


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

二道橋十三太保 提問者

解決了 看我采納的答案
2017-07-28 回復(fù) 有任何疑惑可以回復(fù)我~

第一段代碼50行改成<c:forEach?items="%{messageList}"?var="message"?varStatus="status">

messageList這個值需要在request里取出來的

0 回復(fù) 有任何疑惑可以回復(fù)我~

把bean下的Message代碼發(fā)出來看看。是不是command拼錯了

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

二道橋十三太保 提問者

發(fā)上來了
2017-04-01 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

Property 'command' not found on type java.lang.String?這個錯誤是為什么?

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號