Skip to content

Commit c2a18de

Browse files
committed
Merge branch 'dev'
2 parents 462d2df + be61291 commit c2a18de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+362
-516
lines changed

.classpath

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="lib" path="lib/httpclient-4.5.2.jar"/>
4-
<classpathentry kind="lib" path="lib/httpclient-cache-4.5.2.jar"/>
5-
<classpathentry kind="lib" path="lib/httpcore-4.4.4.jar"/>
6-
<classpathentry kind="lib" path="lib/httpmime-4.5.2.jar"/>
7-
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
8-
<classpathentry kind="src" path="src"/>
9-
<classpathentry kind="src" path="test"/>
10-
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
11-
<classpathentry kind="lib" path="lib/servlet-api-2.5.jar"/>
12-
<classpathentry combineaccessrules="false" kind="src" path="/fits"/>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
<attribute name="test" value="true"/>
19+
</attributes>
20+
</classpathentry>
1321
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
1422
<attributes>
15-
<attribute name="owner.project.facets" value="java"/>
23+
<attribute name="maven.pomderived" value="true"/>
24+
</attributes>
25+
</classpathentry>
26+
<classpathentry combineaccessrules="false" kind="src" path="/fits"/>
27+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
28+
<attributes>
29+
<attribute name="maven.pomderived" value="true"/>
30+
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
1631
</attributes>
1732
</classpathentry>
18-
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
33+
<classpathentry kind="output" path="target/classes"/>
1934
</classpath>

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1+
/target/
2+
/*.log
13
# Mac OS X system file
24
.DS_Store
3-
4-
/bin
5-
/dist/
6-
/test.log

.project

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>FITSservlet_GitHub</name>
3+
<name>FITSservlet</name>
44
<comment></comment>
55
<projects>
66
</projects>
@@ -25,8 +25,14 @@
2525
<arguments>
2626
</arguments>
2727
</buildCommand>
28+
<buildCommand>
29+
<name>org.eclipse.m2e.core.maven2Builder</name>
30+
<arguments>
31+
</arguments>
32+
</buildCommand>
2833
</buildSpec>
2934
<natures>
35+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
3036
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
3137
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
3238
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eclipse.preferences.version=1
2+
encoding//src/main/java=UTF-8
3+
encoding//src/main/resources=UTF-8
4+
encoding//src/test/java=UTF-8
5+
encoding/<project>=UTF-8

.settings/org.eclipse.jdt.core.prefs

+2
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
99
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
1010
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
1111
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
13+
org.eclipse.jdt.core.compiler.release=disabled
1214
org.eclipse.jdt.core.compiler.source=1.8

.settings/org.eclipse.m2e.core.prefs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1
+7-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
2-
<wb-module deploy-name="FITSservlet_GitHub">
2+
<wb-module deploy-name="fits-service-1.2.0-SNAPSHOT">
3+
<wb-resource deploy-path="/WEB-INF/web.xml" source-path="/src/main/webapp/WEB-INF/web.xml"/>
4+
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
35
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
4-
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
5-
<wb-resource deploy-path="/WEB-INF/classes" source-path="/test"/>
6-
<property name="context-root" value="FITSservlet_GitHub"/>
6+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
7+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
8+
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
79
<property name="java-output-path" value="/FITSservlet_GitHub/bin"/>
10+
<property name="context-root" value="fits-service"/>
811
</wb-module>
912
</project-modules>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disabled=06target
2+
eclipse.preferences.version=1

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#FITS Service
1+
# FITS Service
22
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.
33
(It has been tested on Tomcat 7, Tomcat 8, and minimally tested on JBoss 7.1.)
44

@@ -33,7 +33,10 @@ Examining a file and returning corresponding metadata containing both FITS outpu
3333
* GET: (using a browser) `http://yourserver.yourdomain.com:<port>/fits/examine?file=path/to/file`
3434
* 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.)
3535
* 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
38+
of `includeStandardOutput=false`. For example:
39+
`http://yourserver.yourdomain.com:<port>/fits/examine?includeStandardOutput=false&file=path/to/file`
3740
#### 2. /version
3841
Obtaining the version of FITS being used to examine input files returned in plain text format. (GET request only)
3942
<br>Examples:
@@ -50,17 +53,17 @@ See <a href="#test-client">below</a> for a Java test client example.
5053
## <a name="tomcat"></a>Deploying to Tomcat 7 and Tomcat 8
5154
### Add Entries to catalina.properties
5255
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:
58-
`FITS_SERVICE_PROPS=/path/to/fits-service.properties`
56+
<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.
61+
Example: `FITS_SERVICE_PROPS=/path/to/fits-service.properties`
5962
#### catalina.properties example
6063
Add the following to the bottom of the file:
6164
- `fits.home=path/to/fits/home` (note: no final slash in path)
6265
- `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.)
6467

6568
#### Additional Information:
6669
**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.)

WebContent/META-INF/.gitignore

-1
This file was deleted.

WebContent/WEB-INF/.gitignore

-1
This file was deleted.
-35.3 KB
Binary file not shown.
-227 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-181 KB
Binary file not shown.
-278 KB
Binary file not shown.
-60.4 KB
Binary file not shown.
-109 KB
Binary file not shown.

WebContent/WEB-INF/lib/jaxen-core.jar

-157 KB
Binary file not shown.

WebContent/WEB-INF/lib/jaxen-jdom.jar

-5.74 KB
Binary file not shown.

WebContent/WEB-INF/lib/jdom.jar

-150 KB
Binary file not shown.
-478 KB
Binary file not shown.

WebContent/WEB-INF/lib/saxon9-dom.jar

-123 KB
Binary file not shown.
-36.3 KB
Binary file not shown.

WebContent/WEB-INF/lib/saxon9.jar

-4.8 MB
Binary file not shown.

WebContent/WEB-INF/lib/serializer.jar

-185 KB
Binary file not shown.

build.properties

-10
This file was deleted.

0 commit comments

Comments
 (0)