<%@ page language="java" import="java.util.*, org.apache.struts.webapp.exercise.*;"%> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> Test html:select Tag <% String multipleValues[] = { "Multiple 0", "Multiple 1", "Multiple 2", "Multiple 3", "Multiple 4", "Multiple 5", "Multiple 6", "Multiple 7", "Multiple 8", "Multiple 9" }; pageContext.setAttribute("multipleValues", multipleValues); Vector options = new Vector(); options.add(new OptionBean("Label 0", "Value 0")); options.add(new OptionBean("Label 1", "Value 1")); options.add(new OptionBean("Label 2", "Value 2")); options.add(new OptionBean("Label 3", "Value 3")); options.add(new OptionBean("Label 4", "Value 4")); options.add(new OptionBean("Label 5", "Value 5")); options.add(new OptionBean("Label 6", "Value 6")); options.add(new OptionBean("Label 7", "Value 7")); options.add(new OptionBean("Label 8", "Value 8")); options.add(new OptionBean("Label 9", "Value 9")); pageContext.setAttribute("options", options); %>

Test struts-html Select Tag

Whatever changes you make to properties should be reflected when the page is redisplayed. Press "Save" to update, or "Cancel" to return to the main menu.
Single Select Allowed: Single 0 Single 1 Single 2 Single 3 Single 4 Single 5 Single 6 Single 7 Single 8 Single 9
Multiple Select Allowed:
Multiple Select From A Collection:
Save Reset Cancel