-
Example 21 shows the
source code for the JSP that lists a user's items
-
Code has had some formatting and exception handling removed so that its fits on
the slide better
-
Elements of the page
-
Starts with normal HTML
-
<jsp:useBean tag associates a particular Java object with this client's
session
-
This Java object can hold state about the session, e.g. the client's User bean
-
JSP <%@ tag for including another HTML file
-
Common UI Header (including action buttons) is included
-
JSP <% tag used to demarcate Java code
-
First, obtain home objects using utility methods on UserProxy bean class
-
Next, get user's items via findItemsByUser()
-
Note, UserProxy used to get User bean for current user
|