Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %>
- <%@ taglib uri = "http://java.sun.com/jsp/jstl/sql" prefix = "sql" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>View Design</title>
- </head>
- <body bgcolor = "red">
- <sql:setDataSource var = "myDs"
- driver = "com.mysql.jdbc.Driver"
- url = "jdbc:mysql://localhost/design"
- user = "root"
- password = "yellow1"
- />
- <sql:query var ="fetchdata" dataSource = "${myDs}">
- SELECT *FROM extra;
- </sql:query>
- <div align = "center">
- <table>
- <tr style = "font-weight:Bold">
- <td>Desgin_Name</td>
- <td>Date</td>
- <td>Image</td>
- </tr>
- <c:forEach var = "fetch" items = "${fetchdata.rows}">
- <tr>
- <td><c:out value = "${fetch.Design_name}"/></td>
- <td><c:out value = "${fetch.Date}"/></td>
- <td><c:out value = "${fetch.Image}.tostring();"/></td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment