The standalone Mulgara server has the services embedded in code, while the WAR files configure the endpoints with a Web Deployment Descriptor file (web.xml).

WAR Files

The web.xml file configures the /sparql and /tql endpoints as servlet mappings to the SparqlServlet and TqlServlet classes. This configuration can be updated by modifying the src/war/mulgara/WEB-INF/web.xml file, and re-building the WAR by executing the command: mulgara-war

Note: Use build.bat on Windows

For full details on how to configure the web.xml file, see chapter “Deployment Descriptor” in the Java Servlet specification.

Two WAR files are available: mulgara-x.y.z.war and mulgara-core-x.y.z.war (where x.y.z refers to the version number). The first WAR file contains everything needed to run Mulgara, including all the library dependencies. However, many application server environments can contain conflicts with some of the classes in the imported libraries. If this is the case, then use mulgara-core-x.y.z.war archive, as this does not include any imported libraries. The remaining libraries that Mulgara requires can be found in the /lib directory, and these can be added to the Application Server's class path.

SPARQL Endpoint in the WAR File

A compliant SPARQL endpoint is not a REST interface, but instead offers read-only operations. This is important for public access to the database.

The default WAR file does not include a read-only endpoint, as the required /sparql URL was already being used for the REST interface. To configure a compliant read-only SPARQL endpoint, set the SPARQL servlet in the web.xml file to refer to the class PublicSparqlServlet instead of SparqlServlet. The line for this is already present in the file as a comment.

Standalone Server

The code for configuring these REST endpoints can be found in the org.mulgara.server.HttpServices class. The entire configuration is captured in the getContextStarters() method.

If you have a need for a different configuration in a standalone server, and modifying the code is unacceptable, please get in touch with the developers and make a feature request for easy configuration of these services.

SPARQL Endpoint

The read-only servlet is already configured in the standalone server. It is attached to the /sparql/ path, but on port 8081, instead of port 8080, which is where the read-write interfaces are to be found.

A configurable firewall can be configured to only allow local access to port 8080, while permitting public access to port 8081.