Resultset To List

后端 未结 3 1370
别那么骄傲
别那么骄傲 2020-12-05 10:33

I want to convert my Resultset to List in my JSP page. and want to display all the values. This is my query:

SELECT userId, userName 
  FROM user;
         


        
3条回答
  •  庸人自扰
    2020-12-05 11:02

    You could always use Commons DbUtils and the MapListHandler. From the doc:

    ResultSetHandler implementation that converts a ResultSet into a List of Maps

    so it'll take a lot of boilerplate code out of your hands.

提交回复
热议问题