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

前端 未结 3 928
既然无缘
既然无缘 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

    First of all, If you are trying to do something with MVC you should decouple your code. JSP file only access to the request with no java code at all.

    So your Controller needs to do something like this.

     request.setAttribute("ipsections",added.populateSelect());
    

    and then, in your jsp file

    
    

提交回复
热议问题