I'm studying Java EE and reading a chapter that talks about Javabeans, and jsp:setproperty
.
The example is:
<jsp:useBean id="user1" class="User" />
<jsp:setProperty id="user1" property="name" value="Johnnie" />
Why should I even bother doing this? and not using the following code in my jsp:
<%
User user1 = new User();
user1.setName('johnnie');
%>