Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to populate page drop-down list in Struts from action?

843838Nov 25 2005 — edited Feb 20 2006
I have following mockup JSP:
...
<td colspan="2" height="28"> <font size="2"> 
        <html:select property="sj">
           <html:option value="allj">aaa,1,str1</html:option>
         </html:select>
                    </font>
                  </td>
...
Struts action will prepare results as String[] array e.g.:

aaa,1,str1
aaa,2,str2
aaa1,1,str3
aaa1,b,str4
...

and I have to show this in the page as a drop-down list of values that are represented in this String[] array returned from Struts action.
Should action return result array in original ActionForm submitted to the action by this page or should it just put the array into request or session? I need an example if possible

Many thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2006
Added on Nov 25 2005
5 comments
514 views