Retrieve values from JDBC and use JSTL tags to call the methods

前端 未结 3 923
既然无缘
既然无缘 2020-12-15 14:27

Below is the code which i have written to retrieve values from the database (I have added the whole code so it will be easier for you to understand what i am trying to say h

3条回答
  •  太阳男子
    2020-12-15 15:00

    Use list in class as return value,

     List sectionName = new ArrayList();
    
    while (resultSet.next())
       sectionName.add(resultSet.getString("section_name"));
    

    then do

     
    

    Here parameter is meadiator variable to access list variable value You can use String array also

提交回复
热议问题