SHARE
TWEET

Untitled

a guest May 21st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2.  
  3. <%@ page import = "java.io.*,java.util.*,java.sql.*"%>
  4. <%@ page import = "javax.servlet.http.*,javax.servlet.*" %>
  5. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  6. <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix = "sql"%>
  7. <%@ page import = "DatabaseConnector.Database" %>
  8.  
  9. ....
  10.  
  11.  
  12.  
  13.         <sql:setDataSource url="jdbc:derby://localhost:1527/forum" driver="org.apache.derby.jdbc.ClientDriver"
  14.                            var="mydata"/>
  15.         <sql:query var="result" dataSource="${mydata}">
  16.             SELECT id,titel, name, zeit FROM forum Where ANTWORT=false
  17.         </sql:query>
  18.  
  19.  
  20. ...
  21.  
  22. <c:forEach var="row" items="${result.rows}">
  23.                 <tr>
  24.                     <td><a href="beitrag-lesen.jsp?Id=<c:out value="${row.id}"/>"><c:out value="${row.titel}"/></a></td>
  25.                     <td><c:out value="${row.name}"/></td>
  26.                     <td><c:out value="${row.zeit}"/></td>
  27.                 </tr>
  28.             </c:forEach>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top