org.hsqldb.server
Class Servlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.hsqldb.server.Servlet
-
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class Servlet extends javax.servlet.http.HttpServletServlet 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://myhost.com:8080/servlet/org.hsqldb.server.Servlet
The database path/name is taken from the servlet engine property:hsqldb.server.database
If the database is deployed in the WEB-INF directory of the servlet container, the property:
hsqldb.server.use_web-inf_path
should be set "true" in the web.xml file of the servlet container. In this case, the database path should begin with a "/". 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)
Extensively rewritten for HSQLDB.
- Since:
- Hypersonic SQL
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Servlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)voidinit(javax.servlet.ServletConfig config)
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config)
- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG