检查 JSP 中的请求属性
我正在尝试检查 jsp 中的请求属性以显示/隐藏某些 html。
request.setAttribute("submitted", "true");
jsp:
<c:if test="${submitted == 'false'}">
// some html
</c:if>
但是无论我在属性中设置什么值,条件总是评估为 false。 该属性在条件内不可见吗?
萨希尔
I am trying to check a request attribute in a jsp to show/hide certain html.
request.setAttribute("submitted", "true");
jsp:
<c:if test="${submitted == 'false'}">
// some html
</c:if>
But no matter what value I set in the attribute, the condition always evaluates to false.
Is the attribute not visible inside the condition?
Sahil
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
在你的 JSP 中:
Try this instead:
and in your JSP: