Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ 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"%>
- --%>
- <html>
- <head>
- <title>JINSERT Operation</title>
- </head>
- <body>
- <sql:setDataSource var="snapshot" driver="org.h2.Driver"
- url="jdbc:h2:tcp://localhost/~/NetIDEa"
- user="" password=""/>
- <sql:update dataSource="${snapshot}" var="result">
- INSERT INTO UTILISATEUR VALUES ('root@hot, 'root', 'root', 12);
- </sql:update>
- <sql:query dataSource="${snapshot}" var="result">
- SELECT * from UTILISATEUR;
- </sql:query>
- <table border="1" width="100%">
- <tr>
- <th>Emp ID</th>
- <th>First Name</th>
- <th>Last Name</th>
- <th>Age</th>
- </tr>
- <c:forEach var="row" items="${result.rows}">
- <tr>
- <td><c:out value="${row.id}"/></td>
- <td><c:out value="${row.first}"/></td>
- <td><c:out value="${row.last}"/></td>
- <td><c:out value="${row.age}"/></td>
- </tr>
- </c:forEach>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement