org.hsqldb
Class HypersonicDBServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.hsqldb.HypersonicDBServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class HypersonicDBServlet
- extends javax.servlet.http.HttpServlet
Database Servlet handling the access to the
HyperSonic SQL
database. Unfortunately, in the current version 1.6.0 of
org.hsqldb.Serlvet, the database filename is not configurable, but it
has to be set fixed in the constructor. This does not fit to the
servlet API. Hence, we import the sourcecode of
org.hsqldb.Serlvet in the hope, that this will be
fixed in the future.
Created: Sun Nov 12 07:41:51 2000
- Version:
- $Revision: 1.5 $
| Fields inherited from class javax.servlet.http.HttpServlet |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
database
private Database database
filename
private java.lang.String filename
sError
private static java.lang.String sError
iQueries
private static long iQueries
lModified
private static long lModified
HypersonicDBServlet
public HypersonicDBServlet()
init
public void init(javax.servlet.ServletConfig config)
- Initializes the servlet. The following parameters are
recognized:
- filename: local filename of the database.
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Delivers the database status. This method is a 1:1 copy from
org.hsqldb.Serlvet.
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Handles the database access. The request should be of the form:
<user>+<password>+<SQL command>
This method is a 1:1 copy from org.hsqldb.Serlvet.
getLastModified
protected long getLastModified(javax.servlet.http.HttpServletRequest req)
- Always delivers a new integer value. This is made so that the
cache of the http server is not used maybe there is some other way.
logException
protected void logException(java.lang.Exception e)
- Write the exception stacktrace to the log file of the
servlet engine.
showStackTrace
private java.lang.String showStackTrace(java.lang.Exception e)
- Converts the stack trace of the exception to a single
String.