> <html:select name="customer>
> <html:options collection="customers" value="id" label="name" />
[quoted text clipped - 3 lines]
> put it in my build path or am I missing some steps here. Do I need other
> initialization in my JSP.
You shouldn't need to create a special class that implements the
Collection interface. I'm assuming you already have a bean to represent
a Customer. You can use an ArrayList to hold Customer objects for the
select list.
The two most common approaches are to:
a) Populate an ArrayList with your customers and place it in request scope.
b) Put an ArrayList on the associated form bean, which itself will be in
either request (or perhaps session) scope and available to your JSP.
Try option (a) first, but either way, the collection should be populated
in the action class that forwards to the JSP, not in the JSP itself. (If
you did that the view would be accessing the model directly, which is
not MVC). So, you'll have something like:
ArrayList customers = new ArrayList();
...
// Populate the list from the model ...
...
request.setAttribute("customers", customers);
return mapping.findForward("forwardToMyJsp");
Regards,
Richard