views:

12

answers:

1

statesList is ArrayList that contains String object.

String[] states = new String[2];
states[0] = "CA";
states[1] = "California";
statesList.add(states);

//---

<s:select list="statesList"  headerKey="" headerValue="Select State"  name="state" listKey="?" listValue="?" />

What to mention in listKey and listValue??

A: 

Your statesList is ArrayList that contains String[] object, instead of String.

With this said you can change your code to:

Map<String,String> statesList= new HashMap()<String,String>;
statesList.put("CA","California");

<s:select list="statesList" headerKey="" headerValue="Select State"  name="state" listKey="key" listValue="value" />
rsilva