Home:ALL Converter>Populate select list from database in Struts 2

Populate select list from database in Struts 2

Ask Time:2015-08-29T14:30:02         Author:Vijay Main

Json Formatter

I need assistance to populate select list in Struts 2. Have simple registration form in which need to fill select list from database say user name list.

I use below format :

<s:select name="username" label="Username" headerKey="-1" headerValue="Select Search Engines" list="%{#{'value':'front','value1':'front1'}}" theme="simple" onchange="getData(this.value)"/>

But how to fill it from database?

Author:Vijay Main,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32283341/populate-select-list-from-database-in-struts-2
yy