====== Elements of JSP (More JSP Constructs) ====== ===== Scriptlets, contd. ===== ==== Using Arrays ==== One can easily use scriptlets to loop over arrays. In this example, the user is presented with choice boxes. When s/he presses the submit button, the choices are displayed.
Classical
Rock
Jazz
Blues
DC GoGo
<% String[] selected = request.getParameterValues("music"); if (selected != null && selected.length != 0) { %> You like the following kinds of music: