如何在 JSP 中访问 at request 属性? [英] How to access at request attributes in JSP?
本文介绍了如何在 JSP 中访问 at request 属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前我使用:
<%
final String message = (String) request.getAttribute ("Error_Message");
%>
然后
<%= message %>
但是我想知道是否可以使用 EL 或 JSTL 而不是使用 scriptlet 来完成相同的操作.
However I wonder if the same can be done with EL or JSTL instead of using a scriptlet.
推荐答案
EL 表达式:
${requestScope.Error_Message}
JSP EL 中有几个隐式对象.请参阅隐式对象" 标题.
There are several implicit objects in JSP EL. See Expression Language under the "Implicit Objects" heading.
这篇关于如何在 JSP 中访问 at request 属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文