dbServ

Installation
  • Java
  • Start dbServ
  • Start dbServlet
  • The INI-File
  • Database

    Java

    Install Java (version > 1.1.1) first (try
    here for downloading). Set the path for your binaries and don't forget to set the classpath.

    Start dbServ

    Add dbServ.jar to your classpath. Call dbServ the standard way:
    • java de.dbServ.app.dbServ
    oder
    • java -classpath $classpath:./dbServ.jar de.dbServ.app.dbServ
    Do this in the dbServ binary directory.
    You may use some parameter with the call:
    • -port nnnn
      Changes the default for the listening port (4444).
    • -quiet
      Starts with no output.
    • -debug
      Moves the sql statments in a debug log file. It helps you to find the right way for your output.
    • -nogui
      Don't use the small gui.
    • -help
    Since dbServ works like a small web server you don't need another server for the first try. Just start with
       http://localhost:4444/
    
    in your client. It will show you the 'index.html' from dbServ public directory.

    Start dbServlet

    dbServlet starts with the first connect to the servlet engine of the servers. This will need an entry in the servlet.properties:
    servlet.dbservlet.code=de.dbServ.servlet.dbServlet
    servlet.dbservlet.initArgs=inipath=/usr/local/servlet/dbServlet/bin
    
    Inipath is needed to tell dbServlet where the dbServ.ini is placed. Add a path to the jar file (at Apache-Jserv e.g. in zone.properties, repositories=/usr/local/servlet/dbServlet/bin/dbServ.jar).

    To start type

       http://localhost/servlet/dbservlet/
    
    at your client. This will show you the 'index.html' from dbServlet public directory.

    In Tomcat place this text into your web.xml and update the inipath:

     <servlet>
         <servlet-name>
             dbServlet
         </servlet-name>
         <servlet-class>
             de.dbServ.servlet.dbServlet
         </servlet-class>
         <init-param>
             <param-name>inipath</param-name>
             <param-value>/usr/local/servlet/dbServlet/bin</param-value>
         </init-param>
     </servlet>
    
     <servlet-mapping>
         <servlet-name>
             dbServlet
         </servlet-name>
         <url-pattern>
             /dbServlet
         </url-pattern>
     </servlet-mapping>
    


    The INI-File

    The 'dbServ.ini' has some useful parameters:
    [FILES]
    log=access.log
    debug=debug.log
    error=error.log
    blog=on
    bdebug=off
    berror=on
    use_xy=off
    use_gui=off
    #pub=D:\quellen\dbServ\pub\
    pub=/dosd/quellen/dbServ/pub/
    timeout=30
    dbthreads=20
    tanalive=20
    admin=admin
    passwd=xxx
    counturl=jdbc:mysql://localhost:3333/count
    counttime=0
    countdateformat=yyyyMMdd
    counttimeformat=HH:mm:ss
    #mailhost=mail
    #mailfrom=x@x.de
    cachedir=cache/
    cachealive=0
    writer=de.dbServ.writer.dbSimpleWriter
    
    [parsedmimetype]
    htm=text/html
    html=text/html
    xml=text/html
    shtml=text/html
    
    [mimetype]
    gif=image/gif
    
    [driver]
    oracle.jdbc.driver.OracleDriver
    
    You find two parts in the ini. The log files are defined in [FILES]. The interpretation of graphic input (<INPUT TYPE=image ...>) - but no bit map are usable. The variable 'use_gui' shows the gui or not.
    The public directory is defined in 'pub'. The numbers of transactions are alive for 20 minutes (default 30 minutes).
    In the [DRIVER] part you define your database driver.

    database

    For the sql statements you will need a connection to a database.

    When working with Windows the easiest way is to use ODBC databases for starting. You'll get the driver from Microsoft. The drivers have to be installed. Then use 'settings, control panel, ODBC' to define a new database. Therefore use 'System.DSN' to select a driver (e.g. Access) and add a database named 'ADR' for the address example. Later you call this database with 'JDBC:ODBC:ADR' in your template, you don't need Access.

    When working with Linux it may be the best way to start with MySQL (tcx). Get the source and follow the instructions for the installation. For the address database you find some scripts to get your datas in the directory db. The directory adr has to be renamed (it contains the ODBC samples). Then rename adr.MySQL to adr.


  • Axel Fischer, afischer@dbServ.de
    home