%-- The usual apology - "this is really a pretty page with lots of
HTML" --%>
<%@ page import="java.util.*" %>
<%@ page import="soccer.*" %>
Soccer League Results
Search Results
<%-- Pick up SoccerSearchBean with the data --%>
Results
| Home Team |
Away Team |
Home Team Score |
Away Team Score |
<%-- Get Iterator from bean, use it to control while loop --%>
<%
Iterator it = theLeague.games();
while(it.hasNext()) {
SoccerGame sg = (SoccerGame) it.next();
%>
<%-- Body of while loop, --%>
<%-- Once again a mix of template text and expressions --%>
| <%= sg.getTeam1() %> |
<%= sg.getTeam2() %> |
<%= sg.getScore1() %> |
<%= sg.getScore2() %> |
<%-- Scriptlet tag closing the block started at while --%>
<%
}
%>