Sample JSP Page
Let's look at an example using many of the JSP features we discussed. Display.jsp, shown in Listing 15.4, displays a JSP that may be used within the GAMS application to display data for an item up for bid. In line 2, we import our supporting classes as before. Note the use of the include action in line 3. This facility enables us to insert code contained within the header.jsp file (see Listing 15.4) directly into the current JSP. Lines 12–33 implement logic using JSP scriptlets. We'll look at encapsulating program logic into tag libraries in Chapters 17 and 18. Line 7 demonstrates use of the request object. This structure allows a page to be implemented by a request originating from a servlet or another JSP page (the item data ...
Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.