Skip to content

Instantly share code, notes, and snippets.

View staypufd's full-sized avatar

Sam Griffith Jr staypufd

View GitHub Profile
Windows - Run HSQLDB
NOTE: Assumes your hsqldb is installed at c:\ on your PC
java -cp c:\hsqldb-2.3.2\hsqldb\lib\hsqldb.jar org.hsqldb.server.Server
<table class="table table-striped">
<c:forEach items="${theQuotes }" var="aQuote">
<tr>
<td>
<blockquote class="blockquote">
<p>${aQuote.quote }</p>
<footer>
<c:out value="${aQuote.author }"/>
</footer>
</blockquote>
@staypufd
staypufd / gist:13e74b65c9a3fd46f32c
Last active August 29, 2015 14:05
quote jsp code
<sql:query var="results"
sql="select quotation, author from quote"
dataSource="jdbc/quoteDB">
</sql:query>
<c:forEach items="${results.rows }" var="row">
<p>${row.quotation } -- ${row.author }</p>
</c:forEach>
<Resource name="jdbc/quoteDB" auth="Container" type="javax.sql.DataSource"
maxActive="50" maxIdle="30" maxWait="10000"
username="SA" password=""
driverClassName="org.hsqldb.jdbc.JDBCDriver"
url="jdbc:hsqldb:hsql://localhost:9001/"/>
@staypufd
staypufd / gist:ddc7d987ce2de28e0176
Created July 24, 2014 16:25
JSTL - Put at top of jsp pages
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>