Running a Joseki Server

A Joseki server can be run as a standalone server, inside a web application server or embedded inside a larger system.

The Joseki server is a web application so you will need a web application directory structure, or just the WAR file, where your web application server expects it.  Joseki comes with Jetty and configuration files for the webapps/ directory. It works with Tomcat as well.

Running Standalone

To run as a standalone server:

jave -cp ... joseki.rdfserver [--port N] [configFile]

Put all the JAR files in the lib/ directory on the classpath. Run like this, the servlet that implements the protocol is running inside a Jetty web server.  The appropriate JAR files for Jetty are provided in the full distribution or you can download your own.

Simple Configuration

This section is a brief description of the configuration file.  It is fully described elsewhere.  Examples are in the directory etc/.

@prefix joseki: <http://joseki.org/2003/07/configuration#> .

<http://server/externalURL>
    a joseki:AttachedModel ;
    joseki:attachedModel     <file:test_data.rdf> ;
    joseki:hasQueryOperation joseki:BindingRDQL ;
    joseki:hasQueryOperation joseki:BindingGET
    .

Suppose the server is run at host example.com

This example puts a single RDF model at URL http://example.com:2020/externalURL (note the http://server/ has been replaced - this keeps configuration files portable). The default port of the server is 2020 - you can change it from the command line with the --port.

The data for the model comes from a file: test_data.rdf which is assumed to be in XML syntax as the suffix is ".rdf".

The operations allowed are queries over HTTP GET: plain GET and RDQL queries.  No other operations are allowed.

Logging

Joseki uses Java logging. Unless you set the environment variable java.util.logging.config.file, the standalone server will load the file "etc/logging.properties" to control the output of log messages.

Running as a web application

Joseki is a single servlet which can be added as a separate web application or within some other web application.  There is an example web.xml file.

Running an Embedded Server

See the class org.joseki.server.RDFServer.  The standalone server application is a command line wrapper to creating an instance of this class.