From 4043fbd1e62b6df26ed52d843f3d9bf1396db53d Mon Sep 17 00:00:00 2001 From: Matthew Slowe Date: Fri, 29 May 2020 13:50:59 +0100 Subject: [PATCH] dump database --- war/dump.jsp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 war/dump.jsp diff --git a/war/dump.jsp b/war/dump.jsp new file mode 100644 index 0000000..a9d7add --- /dev/null +++ b/war/dump.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html" %> +<%@ page import="java.sql.*" %> +<%@ page import="org.sqlite.*" %> + + + + + SQLite Demo + + + + + + + + + + + + + + + <% + Connection conn = + DriverManager.getConnection("jdbc:sqlite:" + getServletContext().getInitParameter("sqlite_db")); + Statement stat = conn.createStatement(); + + ResultSet rs = stat.executeQuery("select * from grids;"); + + while (rs.next()) { + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + } + + rs.close(); + conn.close(); + %> + + +
idtimestampremotehostinputsize_xsize_ysimpleresult
" + rs.getString("id") + "" + rs.getString("ts") + "" + rs.getString("remotehost") + "
" + rs.getString("input") + "
" + rs.getInt("size_x") + "" + rs.getInt("size_y") + "" + rs.getInt("simple") + "
" + rs.getString("result") + "
+ + \ No newline at end of file