The CrossWire Bible Society
  Home     About Us     Bible Societies, Outreach Ministries, & Publishers       Read the Bible  
       Contact     Volunteers & Developers     The SWORD Project    

   
SWORDWeb is a set of tools and ready to install web application for exposing SWORD functionality on a website.

See it in action

http://www.crosswire.org/study/

Installation

These instructions are Linux specific (don't all real websites run on Linux?), but the components used to make SWORDWeb operate all claim to be cross-platform, so please modify these instructions to work on the platform of your choice

Basic steps to get things up on your end:

Prerequisites

(along with the version we're using-- newer versions should work fine):

omniORB (omniORB-4.1.4)

or

ORBit (ORBit2-2.12.4)
ORBit C++ (orbitcpp-1.3.9)

If you choose ORBit, it must be configured to NOT use its own accelerated transport, but instead, the standard IIOP. This is a little tricky. We do this by placing a file: /usr/etc/orbitrc, containing:
ORBIIOPIPv4=1
ORBIIOPIPv6=1
ORBIIOPUSock=0

This should be alternatively located at /etc/orbitrc, or /usr/local/etc/orbitrc, depending on how you configured ORBit

Java Development Kit (Sun JDK build 1.6.0-b13)
JSP/Servlet Engine (Apache Tomcat/6.0.20)

Example Prerequisite Machine

Ubuntu 9.10 with these packages:
  • subversion
  • automake
  • libtool
  • g++ (or build-essential on older Ubuntu systems)
  • zlib1g-dev
  • libicu-dev
  • libcurl4-openssl-dev
  • libclucene-dev
  • omniidl4
  • libomniorb4-dev
  • openjdk-6-jdk
and Tomcat downloaded from Apache and extracted to /opt/tomcat and started with /opt/tomcat/bin/startup.sh

NB: The Tomcat packages (tomcat6 tomcat6-admin) that come with Ubuntu are configured to place parts of Tomcat all throughout your system and this makes initial setup and development with SWORDweb more of a challenge for the un-initiated.

Instructions:

Obtain sword and swordweb from SVN
$ svn co https://crosswire.org/svn/sword/trunk/ sword
$ svn co https://crosswire.org/svn/swordweb/trunk/ swordweb

Then:
$ cd sword
$ ./autogen.sh
$ ./usrinst.sh
$ make
$ su
# make install
# make install_config
# exit
$

The SWORD engine should now be installed. You should be able to download any books from our site (http://www.crosswire.org/sword/modules/ Choose the RawZip download link for each book) that you wish to make available and unzip them to /usr/share/sword.

You can test that the engine is working and finding its library with something like:
$ cd tests
$ make
$ ./mgrtest

Once the engine is working, building the ORB service should be pretty basic:

$ cd bindings/corba/omniorbcpp
or
$ cd bindings/corba/orbitcpp

$ make

At this point you can test that the ORB is working. There is a test client that makes basic calls to the service. To test, run ./server, then in another window, run ./testclient The IOR was outputted to the screen when you ran the ./server.

Once the service is working fine, there is no install script, so you'll need to move it with a command like:

$ mv server /usr/bin/swordorbserver

Now, if you'd like to get our webclient running, these steps should do it for you:

$ cd bindings/corba/java
$ vi Makefile (or substitute vi for your favorite editor, and modify TOMCAT_HOME to point to your jsp engine, then modify instdir to point to the webapp directory under where you checked out the swordweb svn sources (if swordweb is not yet installed; e.g., instdir=/home/myuser/swordweb/webapp), or the webapp directory where swordweb is currently running (to update an existing installation; e.g., instdir=${TOMCAT_HOME}/webapps/swordweb)
$ make
$ make install

This should install the java helper classes that bind to the CORBA service.

There is also a testclient script in this directory which will run a simple java client which launches the c++ swordorbserver and tries to attach to it and call a few simple methods. You will likely have to edit the testclient script and supply the correct paths.

Moving on to the swordweb package... there should be a src directory included which should be compiled using the associated Makefile, following suite, as before, being sure to first edit the Makefile to supply the appropriate paths.

Now you should be able to move the swordweb stuff into the servlet container's (tomcat, etc.) webapp folder where you installed the CORBA classes, if the location is different from where the swordweb package is located.

Things SHOULD now show signs of life with something like:
http://localhost:8080/swordweb

There are many settings which you will want to adjust. Have a look at the configuration file:
swordweb/webapp/WEB-INF/swordweb.properties

There are a few simple examples under swordweb/examples. For learning to use the tools, these are much more concise than the full web application.

Help



Bug Reports / Feedback




        CrossWire Bible Society; P. O. Box 2528; Tempe, AZ   85280-2528   USA