There should be setters and getters for your list (in your case "oList") for corresponding action class when assigning to struts select tag.
populate struts2 drop down list from an arrray list
-
01-07-2022 - |
Question
Actually several links are there, describing how to populate select tag in struts2 using arraylist.Drop down list in struts2. But i didnt get it. Error I got is
tag 'select', field 'list', name 'role': The requested list key '%{oList}' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
(My list name is oList,which is already filled from action class from database)
List oList=new ArrayList();
Please help me to clear my error. I tried several. Sorry if i do any mistake.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow