<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<style type="text/css">
div {
background-color: #c3c3c36e;
300px;
float:left;
margin-right:20px;
margin-left:10px;
}
p {
line-height :1.8em;
font-size:14px;
}
</style>
</head>
<body>
<sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test_ll? useUnicode=true&characterEncoding=utf-8"
user="root" password="root"/>
<sql:query dataSource="${snapshot}" var="result">
SELECT * from table1;
</sql:query>
<sql:query dataSource="${snapshot}" var="result1">
SELECT * from table2;
</sql:query>
<sql:query dataSource="${snapshot}" var="result2">
SELECT * from table3;
</sql:query>
<div id="row1">
<p>
<tr>
<th></th>
</tr>
<c:forEach var="row" items="${result.rows}">
<img src="img/icon1.png"> ${row.content}<br/>
</c:forEach>
</p>
</div>
<div id="row2">
<p>
<tr>
<th></th>
</tr>
<c:forEach var="row" items="${result1.rows}">
<img src="img/icon1.png"> ${row.content}<br/>
</c:forEach>
</p>
</div>
<div id="row3">
<p>
<tr>
<th></th>
</tr>
<c:forEach var="row" items="${result2.rows}">
<img src="img/icon1.png"> ${row.content}<br/>
</c:forEach>
</p>
</div>
</body>
</html>