Xindice Tomcat How-To | ![]() |
Intended audience
This How-to is aimed at developers or administrators who want to install Xindice with Tomcat.
Prerequisites
The most important prerequisite is patience. Take lots of deep breaths. It will work. It just might take some time.
Steps
Copy the war file
If you've followed the prerequisites, then you will have a working version of Tomcat installed, and the sources of Xindice compiled. Now, copy the xindice*.war file from dist to %CATALINA_HOME%/webapps
Here's what that looks like in Windows
D:\xindice\current\xml-xindice>dir dist Volume in drive D is Data Volume Serial Number is A3EB-9689 Directory of D:\xindice\current\xml-xindice\dist 11/18/2002 01:55p <DIR> . 11/18/2002 01:55p <DIR> .. 11/18/2002 01:55p 9,467 xindice-1.1b-examples.jar 11/20/2002 03:57p 392,842 xindice-1.1b.jar 11/20/2002 03:57p 2,421,719 xindice-1.1b.war 3 File(s) 2,824,028 bytes 2 Dir(s) 6,087,331,840 bytes free D:\xindice\current\xml-xindice>copy dist\xindice-1.1b.war %CATALINA_HOME%\webapp s\ 1 file(s) copied. D:\xindice\current\xml-xindice>
If you are using Linux, your session might resemble:
root@gogo:/local/xml-xindice# ls -oat dist total 2760 drwxr-xr-x 2 root 4096 Nov 25 20:10 . -rw-r--r-- 1 root 247 Nov 25 20:10 xindice-1.1b.xml drwxr-xr-x 13 root 4096 Nov 25 00:01 .. -rw-r--r-- 1 root 9504 Nov 23 15:27 xindice-1.1b-examples.jar -rw-r--r-- 1 root 2408531 Nov 23 15:27 xindice-1.1b.war -rw-r--r-- 1 root 379794 Nov 23 15:27 xindice-1.1b.jar root@gogo:/local/xml-xindice# cp dist/xindice-1.1b.war $CATALINA_HOME/webapps root@gogo:/local/xml-xindice#
Edit the Tomcat server.xml File
Restart Tomcat
Restart your Tomcat server to be certain that it picks up the Xindice servlet.
Here's what that looks like in Windows
D:\xindice\current\xml-xindice>cd %CATALINA_HOME%\bin D:\jakarta-tomcat-4.1.12\bin>startup Using CATALINA_BASE: D:\jakarta-tomcat-4.1.12 Using CATALINA_HOME: D:\jakarta-tomcat-4.1.12 Using CATALINA_TMPDIR: D:\jakarta-tomcat-4.1.12\temp Using JAVA_HOME: C:\j2sdk1.4.1_01 D:\jakarta-tomcat-4.1.12\bin>
Here's what that might look like on Linux
root@gogo:/var/tomcat4/bin# ./catalina.sh start Using CATALINA_BASE: /var/tomcat4 Using CATALINA_HOME: /var/tomcat4 Using CATALINA_TMPDIR: /var/tomcat4/temp Using JAVA_HOME: /usr/java/jdk1.3.1_06 root@gogo:/var/tomcat4/bin#
Verify the installation
When Tomcat restarts on Windows, you should see a new window open entitled 'Tomcat', and it should look something like this. (Note the xindice classes loading.)
Nov 21, 2002 1:42:07 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Nov 21, 2002 1:42:07 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Nov 21, 2002 1:42:08 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Nov 21, 2002 1:42:09 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.12 Nov 21, 2002 1:42:21 PM org.apache.xindice.core.Database setConfig INFO: Database points to D:\jakarta-tomcat-4.1.12\bin\.\db Nov 21, 2002 1:42:23 PM org.apache.xindice.server.XindiceServlet init INFO: Database successfully started Nov 21, 2002 1:42:24 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 Nov 21, 2002 1:42:24 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on tcp port 8009 Nov 21, 2002 1:42:24 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=20/70 config=D:\jakarta-tomcat-4.1.12\conf\jk2.properties
Here's what the $CATALINA_HOME/logs/catalina.out output looks like on Linux
[INFO] Registry - -Loading registry information [INFO] Registry - -Creating new Registry instance [INFO] Registry - -Creating MBeanServer [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1 Server 1.6 is running Press [Ctrl]+[C] to abort [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080 [INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009 [INFO] JkMain - -Jk running ID=0 time=4/168 config=/var/tomcat4/conf/jk2.properties
In addition, you should be able to verify that xindice is running by loading this URL in your browser http://localhost:8080/xindice-1.1b If it works, you should see something that says "THIS IS AN UGLY DEBUG TOOL!".
If you run into problems, don't worry. Be sure to send feedback so that we can improve these documents for the next person.
Revisions
Find a problem with this document? Consider contacting the mailing lists or submitting your own revision. For instructions, read the How To Submit a Revision.