
Rits rishi
Member • Nov 28, 2013
Dynamically fetch values from database and display in combo box in jsp
I am making a form in jsp where i have to filter 4 combo boxes one after the other .. the values of the combo box have to be fetched from the database dynamically..
in table there are 5 fields:-
id category subcategory brand price
1 garments jacket adidas 4000
2 garments shirt peter England 1000
3 sports bat BDM 800
my form contains combo boxes namely:
category:
subcategory:
brand:
price:
firstly, category should display only those values in list(on front end) that are present in database.[I have done this with sql query and resultset](e.g- garments,sports)
Now on selecting the category(e.g- garments) only the respective subcategory should be displayed i.e next combo box should contain only- jacket, shirt.
similarly other lists should be filtered..
Please tell me statements should be used.
in table there are 5 fields:-
id category subcategory brand price
1 garments jacket adidas 4000
2 garments shirt peter England 1000
3 sports bat BDM 800
my form contains combo boxes namely:
category:
subcategory:
brand:
price:
firstly, category should display only those values in list(on front end) that are present in database.[I have done this with sql query and resultset](e.g- garments,sports)
Now on selecting the category(e.g- garments) only the respective subcategory should be displayed i.e next combo box should contain only- jacket, shirt.
similarly other lists should be filtered..
Please tell me statements should be used.
Product Category