With a couple of standard actions, we can eliminate all the scripting code in our JSP (remember: scripting code includes declarations, scriptlets, and expressions) and still print out the value of the person attribute’s name property. Don’t forget that name is not an attribute— only the person object is an attribute. The name property is simply the thing returned from a Person’s getName() method.
Without standard actions (using scripting)
<html><body> <% foo.Person p = (foo.Person) request.getAttribute("person"); %> Person is: <%= p.getName() %> </body></html>
The way we’ve been doing it.
With standard actions (no scripting)
<html><body> <jsp:useBean id="person" class="foo.Person" scope="request" /> Person created by servlet: <jsp:getProperty name="person" property="name" /> </body></html>
NO Java code here! No scripting, just two standard action tags.