Next Previous Up Contents
Next: Examples
Up: server: Runs an HTTP server to perform STILTS commands
Previous: server: Runs an HTTP server to perform STILTS commands

### B.24.1 Usage

The usage of `server` is

       stilts <stilts-flags> server port=<int-value> basepath=<value>
                                    tasks=<task-name> ...
                                    tablefactory=file|dirs:...|locator:...

If you don't have the `stilts` script installed, write "`java -jar stilts.jar`" instead of "`stilts`" - see Section 3. The available `<stilts-flags>` are listed in Section 2.1. For programmatic invocation, the Task class for this command is `uk.ac.starlink.ttools.task.StiltsServer`.

Parameter values are assigned on the command line as explained in Section 2.3. They are as follows:

`basepath = <value>` (String)
  Base path on the server at which request URLs are rooted. The default is `/stilts`, which means that for instance requests to execute task `plot2d` should be directed to the URL `http://host:portnum/stilts/task/plot2d?name=value&name=value...`

  [Default: `/stilts`]

`port = <int-value>` (Integer)
  Port number on which the server should run.

  [Default: `2112`]

`tablefactory = file|dirs:...|locator:...` (StarTableFactory)
  This parameter determines how input table names (typically the `in` parameter of table processing commands) are used to acquire references to actual table data. The default behaviour is for input table names to be treated as filenames, in conjunction with some file type parameter. While this is usually sensible for local use, in server situations it may be inappropriate, since you don't want external users to have read access to your entire filesystem.

  This parameter gives options for alternative ways of mapping table names to table data items. The currently available options are:

  - `file`: default behaviour - names are treated as filenames
  - `dirs:<dir>:<dir>:...`: following the "`dirs:`" prefix a list of directories is specified which will be searched for the file named. Note that the directory separator character differs between operating systems; it is a colon ("`:`") for Unix-like OSs and a semi-colon ("`;`") for MS Windows. If a given name is identical to the path-less filename in one of the `<dir>` directories, that file is used as the referenced table. File type information is ignored in this case, so the files must be one of the types which STILTS can autodetect, currently FITS or VOTable (FITS is more efficient). By using this option, clients can be restricted to using a fixed set of tables in a restricted part of the server's file system.
  - `locator:<class-name>`: the `<class-name>` must be the name of a Java class on the classpath which implements the interface `uk.ac.starlink.ttools.task.TableLocator` and which has a no-arg constructor. An instance of this class will be used to resolve names to tables.

  The usage and functionality of this parameter is experimental, and may change significantly in future releases.

  [Default: `file`]

`tasks = <task-name> ...` (String)
  Gives a space-separated list of tasks which will be provided by the relevant endpoints of the running server. If the value is `null` then all tasks will be available. However, some tasks don't make a lot of sense to run from the server, so the default value is a somewhat restricted list. If the server is being exposed to external users, you might also want to reduce the list for security reasons. If you don't want any tasks made available, for instance if you want to run the plot service only, you can set this to the empty string.

  [Default: `arrayjoin calc cdsskymatch cone coneskymatch datalinklint doc mocshape parqlint parqlook pixfoot pixsample plot2d plot3d plothist regquery sqlclient sqlskymatch sqlupdate taplint tapquery tapresume tapskymatch tcat tcatn tcopy tcube tgridmap tgroup tjoin tloop tmatch1 tmatch2 tmatchn tmulti tmultin tpipe tskymap tskymatch2 votcopy votlint xsdvalidate plot2plane plot2sky plot2cube plot2sphere plot2corner plot2time`]

Next Previous Up Contents
Next: Examples
Up: server: Runs an HTTP server to perform STILTS commands
Previous: server: Runs an HTTP server to perform STILTS commands

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk