<%-- generated by Dynamator Wed Mar 31 19:15:34 CST 2004 --%> <%@ page session="false" %> <%@ page import="java.util.Enumeration" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.LinkedList" %> <%@ page import="java.util.List" %> <%@ page import="java.util.Iterator" %> <%! private static final String[] dinner_ = new String[] { "quiche", "salad" }; private static final Vector dessert_ = new Vector(); static { dessert_.addElement("Pie"); dessert_.addElement("Ice Cream"); } private static final Vector reminder_ = new Vector(); static { reminder_.addElement("Flowers"); } private Enumeration reminder() { return reminder_.elements(); } %> <% List nonos = new LinkedList(); nonos.add("Day-old sushi"); nonos.add("Fruitcake"); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Shopping List</title> </head> <body> <p>Be sure to pick up the following items on the way home:</p> <ul> <% { String[] $dinner_ = dinner_; int lim$dinner_ = $dinner_.length; String menuItem; for ( int i$dinner_ = 0; i$dinner_ < lim$dinner_; ++i$dinner_ ) { menuItem = $dinner_[i$dinner_]; %><li class="dinner"><%= menuItem %></li><% } } %> </ul> <p>If you'd like dessert, please also buy:</p> <ul> <% { java.util.Vector $dessert_ = dessert_; int lim$dessert_ = $dessert_.size(); String dessertItem; for ( int i$dessert_ = 0; i$dessert_ < lim$dessert_; ++i$dessert_ ) { dessertItem = (String) $dessert_.elementAt(i$dessert_); %><li class="dessert"><%= dessertItem %></li><% } } %> </ul> <p>And don't forget:</p> <ul> <% { java.util.Enumeration $reminder = reminder(); String reminderItem; while ( $reminder.hasMoreElements() ) { reminderItem = (String) $reminder.nextElement(); %><li class="reminder"><%= reminderItem + "!" %></li><% } } %> </ul> <p>But please don't buy any more:</p> <ul> <% { java.util.Iterator $nonosListIterator = nonos.listIterator(); String nonoItem; while ( $nonosListIterator.hasNext() ) { nonoItem = (String) $nonosListIterator.next(); %><li class="nono"><%= nonoItem %></li><% } } %> </ul> </body> </html>