source: DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/INSTALL.txt @ 4217

Last change on this file since 4217 was 4217, checked in by olhsha, 10 years ago

files INSTALL, UPDATED, CHANGES and README are corrected. The bug with the wrong server diagnostic (403 instead of 404), when a resource's give id is not found, is fixed.

File size: 3.1 KB
Line 
1DASISH annotator back-end installation
2------------------------------------
3
4Contents:
5- Requirements
6- Installation and configuration
7-- placing war-file and ds#webannotator.xml
8-- The fragment to be present in Tomcat's context.xml
9-- The fragment to be present in Tomcat's web.xml
10- Testing
11
12
13= Requirements =
14
15* annotator-backend-XXX-mpi-deploy.tar.gz package
16* Tomcat >=6
17* PostgreSQL >=9.2.4 database for keeping annotations
18
19
20
21= Installation and configuration   =
22=========================================================================================
23== Placing war-file and ds#webannotator.xml at the tomcat's conf/Catalina/localhost ==
24
25You must deploy the annotator's .war file to the tomcat-webuser. Make a directory for the
26application, like e.g. lat/webapps/dasish-web-annotator on lux16,  and deploy .war there following
27the standard TLA procedure.
28
29Then the corresponding ds#webannotator.xml looks as follows:
30
31<?xml version='1.0' encoding='utf-8'?>
32<Context path="/ds/webannotator"
33  docBase="/lat/webapps/dasish-web-annotator/current"
34  debug="0" reloadable="true" crossContext="true">
35</Context>
36
37
38=============================================================================================
39== context.xml ===
40
41The file must contain the fragment for the database, like e.g.on lux16:
42
43         <Resource
44                 name="jdbc/DASISHAnnotator"
45                 auth="Container"
46                 type="javax.sql.DataSource"
47                 driverClassName="org.postgresql.Driver"
48                 url="jdbc:postgresql://localhost/dasish"               
49                 username="XXXXXXX" 
50                 password="YYYYYYY" 
51                 maxActive="20"
52                 maxIdle="5"   
53                 maxWait="4000" />
54
55
56=============================================================================================
57== web.xml ===
58
59So far no parameters to be placed in the "global" web.xml
60
61
62=============================================================================================
63
64= Testing  =
65
66If the application is succesfully deployed, you will get the jsp page after requesting
67
68<server uri>/ds/webannotator
69
70Note that the path "ds/webannotator" is the same as mentioned in  ds#webannotator.xml above.
71
72On this web-page there is a number of test GET requests there which you can send if you want
73to check if it works. For this you will need a login and a password. Ask the dasish backend's
74responsible developer (Olha).
75
76If you want to test POST, PUT and DELETE requests use e.g.
77
78-- chrome REST console, see
79https://chrome.google.com/webstore/detail/rest-console/cokgbflfommojglbmbpenpphppikmonn
80
81-- or a FireFox add-on "Rest client",
82see https://addons.mozilla.org/nl/firefox/addon/restclient/
83
84NOTE that POST and PUT
85
86For Posting/Putting files of cached representations use curl, e.g.
87
88curl -u <user>:<password> -H "Content-Type: multipart/mixed" -F
89"metadata=@cachedInfoToAdd.xml; type=application/xml " -F "content=@artnouveauspain.png;
90type=image/png" -X POST
91http://localhost:8080/annotator-backend/api/targets/00000000-0000-0000-0000-000000000033/fragment/"(1,1)"/cached -i -v
92
93
94
Note: See TracBrowser for help on using the repository browser.