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

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

為什么無法獲得account,卻可以獲得另外的屬性呢?!

為什么無法獲得account,卻可以獲得另外的屬性呢?!

PHP
至尊寶的傳說 2023-03-13 20:16:11
diapatcher.forward(request,response),在轉到的jsp頁面中,用<jsp:useBean id="account" type="bean.Account" scope="request" > <jsp:getProperty name="account" property="name" /></jsp:useBean>無法獲得這個account。用<% bean.Account a = (bean.Account)request.getAttribute("account"); out.print(a.getName());%>卻可以獲得這個屬性,為什么?
查看完整描述

1 回答

?
暮色呼如

TA貢獻1853條經驗 獲得超9個贊

get/setAttribute指的是容器中的某個變量,而<jsp:getProperty是去http的參數請求,所以無法得到,因為你已經重定向了,getParamter方法取不到,jsp:getProperty自然取不到,你可以用setParamter方法設置后再?。?/p>

查看完整回答
反對 回復 2023-03-15
  • 1 回答
  • 0 關注
  • 83 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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