cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019
Date Fri, 16 Apr 2004 06:11:00 GMT
I have this combination working on both Fedora Core 1
and  Windows/2000 Professional.  A quick step by step
guide is given below, along with some sample

1. Grab cocoon-2.1.4 and build it with either
./ war (Linux) or build war (Windows/2000).  I
do not exclude anything.

2. Deploy the resulting war in Tomcat.  I usually
browse to the war file via the Manager Application and
load it that way.

3. Verify that cocoon works.

4. Download Xindice 1.1b4

5. Run either ./ (Linux) or build
(Windows/2000) to build the jar and war.

6. Note that the the resulting war file in
$XINDICE_HOME/dist is xindice-1.1b4-dev.war.  Copy
that to xindice.war.

7. Use the Tomcat Manager Application to load the
xindice.war file.

8. Verify that it works by browsing to
localhost:8080/xindice/.  You should get the ugly
debug tool.

9. Now, create a collection in the database running
under Tomcat.  You can do that by using the command
line application.  The "trick" is using the correct
URL to talk to the Tomcat-supported Xindice database.

For example:

xindice \
  ac -c xmldb:xindice://localhost:8080/db -n testcol

will create a new collection called testcol

10. Verify that the collection is there with both the
command line and the ugly debug tool.  The command
line would look like:

xindice \
  lc -c xmldb:xindice://localhost:8080/db

11. Add some documents so you'll have something to
play with.  I made an entire directory of xml
documents by creating one, the writing a Perl script
to change some information and create a new document.

12. Add the documents to your testcol collection with
a command like the following

xindice \
 addmultiple -c \
 xmldb:xindice://localhost:8080/db/testcol \
 -f data -e xml

(if your documents are in the directory data and they
end with .xml)

13.  Now check that the documents made it in via the
command line and the ugly debug tool.  The command
line looks like:

xindice \
 ld -c xmldb:xindice://localhost:8080/db/testcol

14. Shut down Cocoon using the Tomcat Manager

Now you'll need to do several things:

a) Update the Cocoon jars with the jars from Xindice
b) Modify the sitemap.xmap to activate the "user   
   directory" feature for Cocoon.  This is handy for 
c) Create the appropriate public_html directory
d) Create an appropriate sitemap.xmap file.

1. In $XINDICE_HOME/java/lib there are a bunch of jar
files.  Copy the following jar files to


The versions should match between your Xindice servlet
and Cocoon.

2. In $XINDICE_HOME/dist, you'll find a jar file. 
Mine has the -dev on it since I haven't upgraded yet. 
Copy xindice-1.1b4-dev.jar to

3. In $TOMCAT_HOME/webapps/cocoon/sitemap.xmap,
uncomment the appropriate "user directory" feature. 
For example on Fedcora Core 1 I have:

<map:match pattern="~*/**">
<!-- unix -->
<map:mount check-reload="yes" 
  src="/home/{1}/public_html/" uri-prefix="~{1}"/>

4. Start up the Cocoon application using the Tomcat
Application Manager

5. Verify that
and samples work.

6. Create your public_html directory

7. In that directory, create an xsl subdirectory.

8. Copy




 to that new subdirectory.

9. In your public_html directory, create the following
simple sitemap.xmap
<?xml version="1.0" encoding="UTF-8"?>


<!-- ===== Pipelines ======== -->

<!-- ====== remote database with styling ====== -->
    <map:match pattern="styleremote/**">
      <map:match type="request-parameter" 
      <map:transform src="xsl/xmldb2samples.xsl"/>
        <map:parameter name="contextPath" 
      <map:transform src="xsl/xmldb2samples.xsl"/>
        <map:parameter name="contextPath" 

<!-- === remote database without styling ======= -->
    <map:match pattern="remote/**">
      <map:match type="request-parameter" 
        <map:serialize type="xml"/>
      <map:serialize type="xml"/>


I apologize for the ugly formatting, but you should
get the idea.

Now, browse to:


(where ~user should be your user id), and you should
see the same type of page that you saw for the Cocoon
xmldb sample.  The differences will be that the
collection list will show your remote
(Tomcat-supported) collections and the Collection
label should be:


Please change your port number to reflect where you're
running Tomcat.  I'm using the default 8080 port.

If you wish to access the stand-alone Xindice server
running under Jetty, do the following:

1. Start up xindice with xindice start

2. Change port references in your
public_html/sitemap.xmap from 8080 to 8888, which is
the new default port for Xindice running under Jetty.

I am in the process of learning enough
Woody/Flowscript so that I can bind a form to a
verified XML document and then stuff that into
Xindice.  I haven't gotten that far yet, but I hope to
get around to it again next week.

I realize that this is a bit long, but I hope it
helps.  I have not addressed an embedded Xindice in
this mail message.  I have it working as well, but I
am not happy with the way I have to do this.

You actually have to set a -Dxindice.configuration in (or modify the Windows/2000 registry) in
order to tell Tomcat and Cocoon where to find
system.xml.  I would hope that I could have multiple
embedded Xindice databases specified by multiple
system.xml files . . . but I'm not sure how to
accomplish that.

Hope this helps.

just my two cents . . . .

Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message