Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Combo boxes and servlets - Pls Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Combo boxes and servlets - Pls Help" Watch "Combo boxes and servlets - Pls Help" New topic

Combo boxes and servlets - Pls Help

kripa ganesh

Joined: Nov 01, 2001
Posts: 8
Hello all,
Am struck in the middle of a project. i use Mysql, tomcat3.2.1 on win 98.
Actually the requirement is that, data from a field in a mysql table needs to be read and displayed within a combo box. no idea as to what should be done..pls help.
the combo that displays the field from a table will be used to select options in a html file and the option thus selected got to be stored back into another table
eg: Product category - say..Grocery, Cosmetics
Product name - Spices, Perfume...
So if a user is going to add he/she should select from the predefined category Grocery, cosmetics etc. Then the user will enter the specific prod name into a text field...
mahadevan raja
Ranch Hand

Joined: Apr 11, 2001
Posts: 96
hello gk,
as far as i have understood,i think u want to display contents in a combo box dynamically.isnt it?
in the loop where u check whether the resultset is null ,get the data from the table and put it in the option tag.i.e before the loop give the select open the loop give one option tag and get the string from resultset,after the loop end the select tag.
try it out and reply.
good luck

SPECIALIST-WCSV5.1 Implementation.<br />SYSTEMS EXPERT-WAS4.0 Administration
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
g k,
Javaranch has a policy on valid display names. Please read the naming policy and change your display name to one that conforms with the policy. Thanks.

Matthew Phillips
I agree. Here's the link:
subject: Combo boxes and servlets - Pls Help
It's not a secret anymore!