org.hsqldb
Class Servlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.hsqldb.Servlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Servlet
extends javax.servlet.http.HttpServlet

Servlet can act as an interface between the client and the database for the the client / server mode of HSQL Database Engine. It uses the HTTP protocol for communication. This class is not required if the included HSQLDB Weberver is used on the server host. But if the host is running a J2EE application server or a servlet container such as Tomcat, the Servlet class can be hosted on this server / container to serve external requests from external hosts.

The remote applet / application should use the normal JDBC interfaces to connect to the URL of this servlet. An example URL is:

 jdbc:hsqldb:http://localhost.com:8080/servlet/org.hsqldb.Servlet
 
The database name is taken from the servlet engine property:
 hsqldb.server.database
 

From version 1.7.2 JDBC connections via the HTTP protocol are persistent in the JDBC sense. The JDBC Connection that is established can support transactions spanning several Statement calls and real PreparedStatement calls are supported. This class has been rewritten to support the new features. (fredt@users)

Version:
1.7.2
See Also:
Serialized Form

Constructor Summary
Servlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Method declaration
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Method declaration
protected  long getLastModified(javax.servlet.http.HttpServletRequest req)
          Method declaration
 void init(javax.servlet.ServletConfig config)
          Method declaration
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Servlet

public Servlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
Method declaration


getLastModified

protected long getLastModified(javax.servlet.http.HttpServletRequest req)
Method declaration

Parameters:
req -
Returns:

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws IOException,
                  javax.servlet.ServletException
Method declaration

Parameters:
request -
response -
Throws:
IOException
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws IOException,
                   javax.servlet.ServletException
Method declaration

Parameters:
request -
response -
Throws:
IOException
javax.servlet.ServletException


Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.