Changes

Jump to navigation Jump to search
137 bytes added ,  21:09, 2 June 2012
no edit summary
==Database Access==
There are two modes in which the BaseX web application can access databases(note that, with {{Version|7.3}}, the '''client mode''' has been replaced with the '''server mode'''):* '''local mode:''' : the web application will access and store data on the communicate with a local file systemdatabase context.* '''client server mode:''' : after the first call of one of the provided HTTP services, the web application communicates with will start a separately started [[Startup#BaseX_Server|database server]].This server can then also be addressed from other clients outside the web application. 
The operation mode can be configured as explained further below.
'''Note:''' if the web application stores data in the local file system of the servlet container, then by default it will use a separate directory as home directory. This is because, in many production environments, the servlet container runs as a dedicated user without a {{Code|$HOME}} directory. However BaseX needs to store somewhere it's settings and data. This is why, even when running a servlet container with a normal user (i.e. one which has a {{Code|$HOME}} directory), the web application will not use by the default the settings stored in {{Code|$HOME/.basex}} and will have a different set (or empty set) of databases than the one in the case of the standalone HTTP server. However, this behavior can be changed by manually setting the BaseX home directory to {{Code|$HOME}}, in which case the web application will use the same databases as in the case of the standalone server.
==Configuring Available Services==
To enable or disable one of the provided services, the corresponding servlet entry in the {{Code|web.xml}} file needs to be removed/commented. The default URL paths are listed in the following table:
The following options are available to configure the way the databases are accessed. These can be set in the {{Code|web.xml}} file or as Java system variables (e.g. using <code>-Dorg.basex.mode=local</code> from the command line).
{| class="wikitable"
|- valign="top"
! width='70' | Option
! Default
! Description
|- valign="top"
| {{Code|org.basex.mode}}
| {{Code|local}}
| Operation mode. By default, the servlets will work with a local database context {{Code|org.basex.path}}. With {{Version|7.3}}, the {{Code|client}} mode has been replaced with a new {{Code|server}} mode, which is equivalent to the default mode of the [[#Standalone Application|Standalone Application]]: a BaseX database server instance will be started with the first call of a service, which is then available for other clients, too.
|- valign="top"| {{Code|org.basex.user}}| -| Database user. By default, no value is specified, and the credentials must be specified by the client. Note that it is a clear security risk to store user credentials in the {{Code|web.xml}} file. The default user credentials can be found under [[Startup#BaseX_Client|Startup: BaseX Client]].|- valign="top"| <br/>{{Code|org.basex.password}}
| -
| Database Login data. By default, no user and passwordis specified, and the credentials must be passed on by the client. Please check by yourself if it is safe to store your credentials in the {{Code|web.xml}} file. The default user credentials can be found under [[Startup#BaseX_Client|Startup: BaseX Client]].
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu