You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+12-9
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
#FITS Service
1
+
#FITS Service
2
2
The FITS Service is a project that allows [FITS](http://fitstool.org) to be deployed as a service on either Tomcat or JBoss. The project has been built with Java 8.
3
3
(It has been tested on Tomcat 7, Tomcat 8, and minimally tested on JBoss 7.1.)
4
4
@@ -33,7 +33,10 @@ Examining a file and returning corresponding metadata containing both FITS outpu
33
33
* GET: (using a browser) `http://yourserver.yourdomain.com:<port>/fits/examine?file=path/to/file`
34
34
* POST: (using curl) `curl -k -F datafile=@path/to/file http://yourserver.yourdomain.com:<port>/fits/examine` ('datafile' is the required form parameter that points to the uploaded file.)
35
35
* POST: (using a browser) `http://yourserver.yourdomain.com:<port>/fits/index.html` (Select the file to upload then click the 'Upload' button.)
36
-
36
+
##### a. Optional parameter
37
+
The metadata that is returned contains "standard output" for the given content type within the `<metadata>` element by default. In order to disable this, the URL for both GET and POST requires an additional request parameter
Obtaining the version of FITS being used to examine input files returned in plain text format. (GET request only)
39
42
<br>Examples:
@@ -50,17 +53,17 @@ See <a href="#test-client">below</a> for a Java test client example.
50
53
## <aname="tomcat"></a>Deploying to Tomcat 7 and Tomcat 8
51
54
### Add Entries to catalina.properties
52
55
It’s necessary to add the location of the FITS home directory to the file `$CATALINA_BASE/conf/catalina.properties` then add the location of the FITS lib folder JAR files. (See example below.)
53
-
<br>1. Add the “fits.home” environment variable.
54
-
<br>2. Add all “fits.home”/lib/ JAR files to the shared class loader classpath with a wildcard ‘*’ and the `${fits.home}` property substitution.
55
-
**Note: Do NOT add any JAR files that are contained in any of the FITS lib/ subdirectories to this classpath entry. They are added programmatically at runtime by the application.**
56
-
<br>3. (optional) Rather than using the default log4j.properties file located within the WAR file here: /WebContent/WEB-INF/ (which logs to a file within the Tomcat directory structure) it's possible to set up logging to point to an external log4j.properties file. Add a "log4j.configuration" property to catalina.properties pointing to this file. It can be either a full path or have the `file:` protocol at the beginning of the entry. This is managed by the class `edu.harvard.hul.ois.fits.service.listeners.LoggingConfigurator.java`.
57
-
<br>4. (optional) There are default configuration values for uploaded file located within the WAR file here: /WebContent/WEB-INF/fits-service.properties -- it's possible to set up these values externally. Add the property `FITS_SERVICE_PROPS` to catalina.properties pointing to a customized version of this file. Example:
<br>1. Add the `fits.home` property which points to the base of the FITS installation. Example: `fits.home=/path/to/fits-1.3.0`
57
+
<br>2. Add the FITS JAR files folder to the existing `shared.loader` classpath property using the `${fits.home}` property substitution. Example: `shared.loader=${fits.home}/lib/*.jar`
58
+
**Notes: 1) This property MUST follow the `fits.home` property. 2) Do NOT add any of the JAR files that are contained in any of the FITS lib/ subdirectories to this classpath entry. They are added programmatically at runtime by the application.**
59
+
<br>3. (optional) Rather than using the default log4j.properties file located within the WAR file here: `/src/main/resource/` (which logs to a file within the Tomcat directory structure) it's possible to set up logging to point to an external log4j.properties file. Add a "log4j.configuration" property to `catalina.properties` pointing to this file. It can be either a full path or have the `file:` protocol at the beginning of the entry. This is managed by the class `edu.harvard.hul.ois.fits.service.listeners.LoggingConfigurator.java`.
60
+
<br>4. (optional) There are default configuration values for uploaded file located within the WAR file here: `/src/main/resource/fits-service.properties` -- it's possible to set up these values externally. Add the property `FITS_SERVICE_PROPS` to catalina.properties pointing to a customized version of this file.
-`fits.home=path/to/fits/home` (note: no final slash in path)
62
65
-`shared.loader=${fits.home}/lib/*.jar`
63
-
-`log4j.configuration=/path/to/log4j.properties` or `log4j.configuration=file:/path/to/log4j.properties` (optional -- to override using the default log4j.properties in the WEB-INF directory of the WAR file.)
66
+
-`log4j.configuration=/path/to/log4j.properties` or `log4j.configuration=file:/path/to/log4j.properties` (optional -- to override using the default log4j.properties in the WEB-INF/classes directory of the WAR file.)
64
67
65
68
#### Additional Information:
66
69
**Class loading:** Within the WAR file’s META-INF directory is a Tomcat-specific file, context.xml. This file indicates to the Tomcat server to modify the Tomcat default class loader scheme for this application. The result is that, rather than load the WAR’s classes and JAR files first, classes on Tomcat’s shared classpath will be loaded first. This is critical given the nature of the custom class loaders used in FITS. (This file will be ignored if deploying to JBoss.)
0 commit comments