- Xindice address book example - This code is an example application using Xindice and the XML:DB api with jsp and servlets to provide an online address book. NOTE: These instructions assume that you already have the Xindice Server up and running. Installation for Tomcat ----------------------- Tomcat is available from http://jakarta.apache.org/tomcat/ In the following instructions we assume that XINDICE_HOME is set to the directory where Xindice is installed and TOMCAT_HOME is set to the directory where Tomcat is installed. Tomcat 4.0 or above. 1. Make sure your current working directory is the directory where this README file resides. If not, type. (on UNIX) cd $XINDICE_HOME/java/examples/Addressbook (on Windows) cd %XINDICE_HOME%\java\examples\Addressbook 2. Add the servlet.jar file from Tomcat to your classpath. CLASSPATH=path_to_your_tomcat_install/common/lib/servlet.jar export CLASSPATH 3. Build the Addressbook.war. The file is built by the ant script (on UNIX) $XINDICE_HOME/bin/ant (on Windows) %XINDICE_HOME%\bin\ant 4. You should find the file Addressbook.war in the current directory. This file should be copied into the webapps directory of your tomcat installation. (on UNIX) cp Addressbook.war $TOMCAT_HOME/webapps (on Windows) copy Addressbook.war %TOMCAT_HOME%\webapps 5. Make sure Xindice is running, follow the INSTALL instructions to start it if it isn't. 6. Start tomcat, (on UNIX) $TOMCAT_HOME/bin/startup.sh (on Windows) %TOMCAT_HOME%\bin\startup.bat 6. If you used the default tomcat configuration the Addressbook should be accessible from http://127.0.0.1:8080/Addressbook. Tomcat 3.2 If at all possible you should use Tomcat 4 as installation is much simpler, but Tomcat 3.2 will work as well with a little extra effort. 1. Make sure your current working directory is the directory where this README file resides. If not, type. (on UNIX) cd $XINDICE_HOME/java/examples/Addressbook (on Windows) cd %XINDICE_HOME%\java\examples\Addressbook 2. Add the servlet.jar file from Tomcat to your classpath. CLASSPATH=path_to_your_tomcat_install/lib/servlet.jar export CLASSPATH 3. Build the Addressbook.war. The war is built by the ant script (on UNIX) $XINDICE_HOME/bin/ant (on Windows) %XINDICE_HOME%\bin\ant 4. You should find the file Addressbook.war in the current directory. This file should be copied into the webapps directory of your tomcat installation. 5. Place a copy of xerces.jar (From $XINDICE_HOME/java/lib) in Tomcat's lib directory, renaming the file to ensure that it will be first in the classpath. (Yes this is a kludge, but necessary since Tomcat is using it's own XML parser that is incompatible with Xindice) If the version of xerces you find in your Xindice distribution is different just use it and change the numbers accordingly. Example... cp $XINDICE_HOME/java/lib/xerces-1.3.0.jar $TOMCAT_HOME/lib/1xerces-1.3.0.jar 6. Copy the following jar files to your Tomcat lib directory. The same directory where you just copied Xerces. From $XINDICE_HOME/java/lib. Again adjust the versions if necessary xindice.jar xmldb.jar xalan-2.2.D11.jar 7. Make sure Xindice is running, follow the INSTALL instructions to start it if it isn't. 8. Start Tomcat (on UNIX) $TOMCAT_HOME/bin/startup.sh (on Windows) %TOMCAT_HOME%\bin\startup.bat 9. Finished - You should now be able to load the addressbook. http://127.0.0.1:8080/Addressbook If you have problems please post you questions on the Xindice users mailing list.