i want to create combo box/ drop down menu with a list from my servlet.
can i use a for an in the for write the tag <option>
of the select component and it will create the options dynamically?
there is other way? this way should work?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
i want to create combo box/ drop down menu with a list from my servlet.
can i use a for an in the for write the tag <option>
of the select component and it will create the options dynamically?
there is other way? this way should work?
Have a look at JSTL
You can use the foreach tag.
JSP Standard Tag Library (JSTL) c:forEach Tag
// Json
Hi,
you can use c:if tag of jstl too to show an element in a select box as selected for a particular condition.
you have to use standard.jar in lib.
Core java
Last edited by mr.miku; January 11th, 2012 at 07:09 PM.