I know JSP has been deprecated.
Here, it is mentioned that
In JSP, the ${} won't autocreate the managed bean when it's not in scope yet. You can thus only use it if you can guarantee that #{} on the very same managed bean is been used somewhere before in the component tree and also take view build time vs view render time lifecycle into account.
Just to check whether its true or not, I came up with this:
A simple JSP page like this,
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
</head>
<body>
${myPlayersBean.playerName}
Here
</body>
</html>
where
@ManagedBean(name = "myPlayersBean")
@RequestScoped
public class PlayersBean {
private String playerName = "Rafael";
// getters & setters
}
it does outputs on hitting http://localhost:8080/Leonard/faces/create.jsp
:
Rafael Here
Please suggest?