• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to populate values inside a dropdown box

 
Adarsh Raj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a beginner in struts. i want to know how to populate values inside a dropdown box(<html:select>).

I've already created the necessary action forms, action and model classes. I can retrieve values from the database and also i can see that the values present inside the form's action form. But i don't know how to show these values from the action form to a jsp page.

I'm using struts tag in jsp/view components. My code is like this

ActionForm


Jsp code


Adz
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not very good at struts 1.x, so I can point you to what I think should be the solution. Try to use the html:optionsCollection tag inside the html:select tag...
 
Siva Masilamani
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this
 
Adarsh Raj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Siva. That helped
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic