I have a problem at the 2 dropdown lists in my jsp 1- CLASS 2-SECTION.Both should come from database and if i select a class in the class dropdown list then the corresponding section values are came from the database. Please help by providing the code in jsp.And i am using mysql database
example:
classes sections
class1 sec1_1
class1 sec1_2
class2 sec2_1
- Suppose in the class dropdown list value “class1” is selected
-
Then the section dropdown list gets “sec1_1″,”sec1_2” values from the database
- I am facing problem at step 2 please give me the code without using the jquery and ajax
MyPage.jsp
Javascript
struts.xml
In
GetSectionOfClassdeclareclassId,yourClassListandyourSecList(with getter/setter) and populate the lists with your business logic.yourClassListwill containd all the classes whereasyourSecListwill contain sections based onclassId.