jsp页面上怎么用el表达式获取值
1个回答
展开全部
<h4>获取域对象中的值</h4>
<%
request.setAttribute("name", "射雕英雄传");
application.setAttribute("name", "鹿鼎记");
%>
${requestScope.name }
${applicationScope.name }
<h4>获取数组中的值</h4>
<%
String [] strs={"陆小凤","叶孤城","西门吹雪","李寻欢"};
request.setAttribute("strs", strs);
%>
${strs[1] }
<h4>获取集合中的值</h4>
<%
<%
request.setAttribute("name", "射雕英雄传");
application.setAttribute("name", "鹿鼎记");
%>
${requestScope.name }
${applicationScope.name }
<h4>获取数组中的值</h4>
<%
String [] strs={"陆小凤","叶孤城","西门吹雪","李寻欢"};
request.setAttribute("strs", strs);
%>
${strs[1] }
<h4>获取集合中的值</h4>
<%
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询