在JSP中,美元花括号$ {}意味着什么? [英] What does the dollar curly brackets ${} mean in JSP?

查看:258
本文介绍了在JSP中,美元花括号$ {}意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ {} 在JSP中意味着什么?例如,

What does ${} means in JSP? For example,

<c:if test="${!empty cookie.lang}">
    <fmt:setLocale value="${cookie.lang.value}" />
</c:if>


推荐答案

它的 El表达式基本上它输出了评估表达式所得的值,简单来说,它允许你访问的值 java bean 使用点而不是使用getter和setter的属性,使用它可以访问bean的实例可以在会话,请求或页面范围内

its an El expression basically it outputs the value that result from evaluating the expression, to put it simply, it allows you to access the values of the properties of your java beans using "dots" instead of using getters and setters, using it you can access instances of beans that can be in session,request, or page scope

这篇关于在JSP中,美元花括号$ {}意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆