Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我们的 Java EE 项目中使用 JSTL(是的,不是 JSF)。我们在请求属性中使用 POJO,我们将使用 c:out 打印它们的内容。
如果我在 POJO 中重命名 getter,c:out则不会更新(使用 Eclipse)。
c:out
我原以为它会在重构期间被重命名。难道我做错了什么?
一、eclipse不会重构JSP文件中的方法名
eclipse
JSP
二、不需要调用getter JSTL,直接访问字段即可,像这样:
JSTL
<c:out value="${employee.firstName}"/>
第三,只需确保您的吸气剂名称的形式为
public String getFirstName(){ ... }