I'm receiving an empty html/jsp table with no data extracted

后端 未结 3 1970
情话喂你
情话喂你 2021-01-22 16:45

I made a post four days back on this same forum seeking for a solution, but I have been checking for any solutions but in vain. I\'m really stack as I can\'t continue mastering

相关标签:
3条回答
  • 2021-01-22 17:14

    By default mysql port is 3306, can you check by changing url as below? url="jdbc:mysql://localhost:3306/EMP"

    0 讨论(0)
  • 2021-01-22 17:16

    There will not be any space between the sql and (:) you need to keep like this,

    <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost/TEST"
     user="root"  password="pass123"/>
    
    <sql:query dataSource="${snapshot}" var="result">
    SELECT * from Employees;
    </sql:query>
    

    All you need to do is add jstl 1.2 and mysql connector jar files in your /WEB-INF/lib folder and clean your project then run again.

    0 讨论(0)
  • 2021-01-22 17:19

    try this one:

    <tr>
    <td>${row.id}</td>
    <td>${row.age}</td>
    <td>${row.first}</td>
    <td>${row.last}</td>
    

    0 讨论(0)
提交回复
热议问题