GRAPHIC JAVAThe evolution of Java Server Pages

GRAPHIC JAVA
The evolution of Java Server Pages

David Geary

Listing 4. JSP and JavaBeans.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<jsp:useBean id="item" scope="request"
class="com.sunpress.beans.Item"
<jsp:setProperty name="item" property="description" value="total
jim" /
</jsp:useBean <%— Access item description with JSP expression —
%>

Here's the item's description from a JSP expression:

<%= item.getDescription() %>
<%— Access item description with JSP tag —%>

Here's the item's description from a tag:

<jsp:getProperty name="item" property="description" /

About the Author

David Geary was the lead engineer for the Java Management API GUI toolkit, and is now an independent Java consultant. David is the author of Graphic Java—Mastering the JFC. He can be contacted at [email protected].

Upcoming Training Events

0 AM
Visual Studio Live! San Diego
September 8-12, 2025
Live! 360 Orlando
November 16-21, 2025
Cloud & Containers Live! Orlando
November 16-21, 2025
Data Platform Live! Orlando
November 16-21, 2025
Visual Studio Live! Orlando
November 16-21, 2025