1

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');
%>
Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
Urbanleg
  • 6,252
  • 16
  • 76
  • 139

0 Answers0