Changeset 3637


Ignore:
Timestamp:
2002-12-20T16:48:29+13:00 (21 years ago)
Author:
kjdon
Message:

added back in some usage notes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/INSTALL

    r3561 r3637  
    66source setup.bash
    77install.bash
     8source setup.bash
     9
     10Note: the second setup.bash is needed to add the newly created jar files to teh CLASSPATH
    811
    912if you want to use soap, also run
    1013install-soap.bash
    1114
     15You should now be able to run greenstone - go to localhost:8080/gsdl3, and 'run the library servlet'.
    1216
     17If you run these install scripts more than once you end up with multiple entries in some config files.
     18If you are getting problems, edit gsdl3/comms/tomcat/jakarta/conf/server.xml and remove any duplicates of <Context> elements.
     19
     20Some notes for subsequent running of gsdl3:
     21
     22TOMCAT:
     23
     24Tomcat is a servlet container. It is used to serve a greenstone site using a servlet.
     25
     26The file web/WEB-INF/web.xml contains the setup information for tomcat---tells it what servlets to load, what initial paramaters to pass them, and what web names map to the servlets.
     27There are three servlets specified in web.xml: one is a test servlet that just prints ``hello greenstone'' to a web page. This is useful if you are having trouble getting tomcat set up. The other two are greenstone library servlets, ``library'', which serves localsite, and ``library1'' which serves site1.
     28
     29To run tomcat, you need to have sourced setup.bash in $GSDL3HOME  to set up $CLASSPATH. Then,
     30
     31cd \gsdlhome/comms/tomcat/jakarta-tomcat-4.0.1/bin
     32./startup.sh
     33
     34./shutdown.sh shuts down tomcat
     35
     36The tomcat server can be accessed on the web at http://localhost:8080---this gets you to a welcome page.
     37The greenstone stuff is at http://localhost:8080/gsdl3---this displays $GSDL3HOME/web/index.html. You should be able to run the test servlet and both library servlets from this page.
     38
     39Note: tomcat must be shutdown and restarted any time you make changes in the following for those changes to take effect:
     40web/WEB-INF/web.xml
     41comms/tomcat/jakarta-tomcat-4.0.1/conf/server.xml
     42any classes or jar files used by the servlets
     43
     44Note: stdin and stdout for the servlets both go to comms/tomcat/jakarta/logs/catalina.out
     45
     46SITES:
     47There are two greenstone "sites" that come with the checkout: localsite, and site1. localsite has several collections, only two of which have any actual data. The third is a dummy collection. site1 has one dummy collection. Each site has a configuration file which specifies the site name,  site-wide services if any, and a list of remote sites to connect to.
     48localsite does not connect to any other sites. site1 specifies a SOAP connection to localsite.
     49
     50The collections which do not have data can be looked at but you cant do any queries on them.
     51
     52SOAP:
     53
     54site1 specifies a SOAP connection to localsite. If you run site1 without connecting to localsite, you can only see the local  collections, eg the dummy collection myfiles. However, if you connect to localsite, you can see all of its collections as well.
     55
     56The SOAP server we use is actually run as a servlet in tomcat. The install-soap.bash script sets up SOAP, sets up the SOAP server class which will be your service, and then deploys that service.
     57
     58You can also deploy services through the web interface.
     59The SOAP servlet can be accessed at http://localhost:8080/soap. You should see a welcome page. Click on ``Run the admin client''. This enables you to list, deploy and undeploy SOAP services.
     60
     61To deploy the SOAPServer for localsite:
     62
     63Click on ``deploy'' and edit the following fields in the deploy form:
     64
     65
     66ID:  org.greenstone.localsite
     67Scope: (any will do)  Request---new instantiation for each reques
     68              Session---same instantiation across a session
     69              Application---only uses one instantiation
     70Methods: process
     71Java Provider / Provider Class: org.greenstone.gsdl3.SOAPServer
     72
     73
     74Now click the ``deploy'' button at the bottom of the page. If the service has been deployed, it should appear when you click on the lefthand ``List'' button.
     75
     76Information about deployed services is maintained between tomcat sessions---you only need to deploy it once. To get the library1 servlet talking to the SOAP server, you need to shutdown and restart tomcat (see above). You should see more collections when you run the library1 servlet.
     77
     78Debugging SOAP
     79
     80If you need to debug the SOAP stuff for some reason, or just want to look at the SOAP messages that are being passed back and forth, there is a program called TcpTunnelGui. This intercepts messages coming in to one port, displays them, and passes them to another port.
     81
     82To run it:
     83
     84java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080
     85
     86tomcat uses port 8080 - you need to modify greenstone to talk to port 8070 instead of 8080. - this is specified in the 'site' element of the site configuration file.
     87
     88eg, in sites/site1/siteConfig.xml:
     89
     90<site name="org.greenstone.localsite"
     91      address="http://localhost:8080/soap/servlet/rpcrouter"
     92      type="soap"/>
     93
     94You can replace the 8080 with 8070 if you want to run TcpTunnelGui.
     95
     96Note that http://localhost:8080/soap/servlet/rpcrouter is the
     97address for talking to the tomcat SOAP servlet services.
     98
     99
Note: See TracChangeset for help on using the changeset viewer.