You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nina Juliadotter <nv...@it.uts.edu.au> on 2004/04/16 12:16:38 UTC

Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019

Thank you so much for your extensive and step-by-step reply.

Scroll down to read on...


> 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
> pipelines.
>
> 1. Grab cocoon-2.1.4 and build it with either
> ./build.sh 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 ./build.sh (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
> Application.
>
> 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
>    testing.
> 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
> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>
> xml-apis.jar
> xmldb-api-20030701.jar
> xmldb-common-20030701.jar
> xmldb-xupdate-20040205.jar
> xmlrpc-1.1.jar
>
> 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
> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>
> 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}"/>
> </map:match>
>
> 4. Start up the Cocoon application using the Tomcat
> Application Manager
>
> 5. Verify that
> http://localhost:8080/cocoon/samples/xmldb/welcome
> and samples work.
>
> 6. Create your public_html directory
>
> 7. In that directory, create an xsl subdirectory.
>
> 8. Copy
>
> $TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl
>
> and
>
> $TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl
>
>  to that new subdirectory.
>
> 9. In your public_html directory, create the following
> simple sitemap.xmap
> <?xml version="1.0" encoding="UTF-8"?>
>
> <map:sitemap
> xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>
> <!-- ===== Pipelines ======== -->
>   <map:pipelines>
>
> <!-- ====== remote database with styling ====== -->
>   <map:pipeline>
>     <map:match pattern="styleremote/**">
>       <map:match type="request-parameter"
>          pattern="xpath">
>       <map:generate
> src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>       <map:transform src="xsl/xmldb2samples.xsl"/>
>       <map:transform
>         src="xsl/simple-samples2html.xsl">
>         <map:parameter name="contextPath"
>            value="{request:contextPath}"/>
>       </map:transform>
>       <map:serialize/>
>       </map:match>
>       <map:generate
>         src="xmldb:xindice://localhost:8080/db/{1}"/>
>       <map:transform src="xsl/xmldb2samples.xsl"/>
>       <map:transform
>         src="xsl/simple-samples2html.xsl">
>         <map:parameter name="contextPath"
>           value="{request:contextPath}"/>
>       </map:transform>
>       <map:serialize/>
>     </map:match>
>   </map:pipeline>
>
> <!-- === remote database without styling ======= -->
>   <map:pipeline>
>     <map:match pattern="remote/**">
>       <map:match type="request-parameter"
>         pattern="xpath">
>         <map:generate
> src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>         <map:serialize type="xml"/>
>       </map:match>
>       <map:generate
>         src="xmldb:xindice://localhost:8080/db/{1}"/>
>       <map:serialize type="xml"/>
>     </map:match>
>   </map:pipeline>
>
>   </map:pipelines>
> </map:sitemap>
>
> I apologize for the ugly formatting, but you should
> get the idea.
>
> Now, browse to:
>
> http://localhost:8080/cocoon/~user/styleremote/
>

I'm up to here now, but have some troubles with Windows 2000 and permissions. When I
go to my url:

http://localhost:8080/cocoon/~nvjuliad/styleremote

I get the following error:

Resource not found.

org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and
Settings/nvjuliad/My Documents/My Website/ doesn't exist.

cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My
Documents\My Website (Access is denied)

If I move it from this location, the "(Access is denied)" bit is changed to "(The
system cannot find the path specified)", so we know it finds it, but can't get
access to it. I've right-clicked on the My Website folder and under
Properties/Sharing chosen to "Share this folder", but that didn't make any
difference. Does anyone know how to get around this?


> (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:
>
> xmldb:xindice://localhost:8080/db/.
>
>
> 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
> catalina.sh (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.
>

How do I actually do this? I mean, trying to execute -Dxindice.configuration in
Windows commandline doesn't work. I had a look at the registry ("regedit"), but
wouldn't know what to do where or how. I'm not very good with these things in
Windows.

> Hope this helps.
>
> /mde/
> just my two cents . . . .
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

Thanks so much for the help,
Nina



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019

Posted by Mark Eggers <it...@yahoo.com>.
Nina,

I tried reproducing your issue on Fedora Core 1.  I have the same lines
as you do in the main site map.

Check to see if you have the following in your cocoon.xconf.  The lines
are 382 - 394.

<!--..... Start configuration from 'xmldb' -->


<!-- xmldb pseudo protocol -->
<component-instance   
  class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory" 
  name="xmldb">
<!-- Xindice driver -->
  <driver class="org.apache.xindice.client.xmldb.DatabaseImpl" 
    type="xindice"/>
<!-- Xindice 1.1 Embedded driver -->
  <driver class="org.apache.xindice.client.xmldb.embed.DatabaseImpl"
    type="xindice-embed"/>
<!-- Add here other XML:DB compliant databases drivers -->
</component-instance>

<!--..... End configuration from 'xmldb' -->

I created a nina subdirectory in my Cocoon web application, and placed
the following site map in it:

<?xml version="1.0" encoding="UTF-8"?>

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

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

 <map:pipelines>

  <map:pipeline>
   <map:match pattern="remote/**">
    <map:match type="request-parameter" pattern="xpath">
     <map:generate src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
     <map:serialize type="xml"/>
    </map:match>
    <map:generate src="xmldb:xindice://localhost:8080/db/{1}"/>
    <map:serialize type="xml"/>
   </map:match>
 </map:pipeline>

 </map:pipelines>
</map:sitemap>

http://localhost:8080/cocoon/nina/remote/  gives me the following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmldb:collections xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
  resources="0" collections="4"
  base="xmldb:xindice://localhost:8080/db/">
  <xmldb:collection xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
    name="testcol"/>
  <xmldb:collection xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
    name="system"/>
  <xmldb:collection xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
    name="addissue"/>
  <xmldb:collection xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
    name="meta"/>
</xmldb:collections>

(cleaning up the saved file).  The addissue collection is one I use to
play around with.  It currently has 100 documents.

Going after http://localhost:8080/cocoon/nina/remote/testcol/ gave me
the following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmldb:collections xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
  resources="0" collections="0" 
  base="xmldb:xindice://localhost:8080/db/testcol/"/>

Going after http://localhost:8080/cocoon/nina/remote/addissue/ gave me
the following (I'm truncating the list).

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmldb:collections xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
  resources="100" collections="0" 
  base="xmldb:xindice://localhost:8080/db/addissue/">
  <xmldb:resource xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
    name="out00.xml"/>
  <xmldb:resource xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
    name="out01.xml"/>
  <xmldb:resource xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
    name="out02.xml"/>
  <xmldb:resource xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0" 
    name="out03.xml"/>

  (etc)

</xmldb:collections>

I can then bring up a specific resource with
http://localhost:8080/cocoon/nina/remote/addissue/<resource-name>

Another thought - what browser are you using?  I am using Firefox 0.8 on
both the Windows/2000 and Fedora Core 1 systems.  Could this be a
browser artifact?

Other than that, and making sure you built Cocoon with all of the block
enabled (the xmldb block should work), I can't think of anything
off-hand.

I hope this helps

/mde/
just my two cents . . . .


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019

Posted by Nina Juliadotter <nv...@it.uts.edu.au>.
Hi Mark,

Thanks for your attempts to solve my problem.
I don't think I will try and get the embedded mode work, seems to be simpler to use
standalone mode.

Maybe I wasn't clear before, but of course I did go through the steps a, b and c below.
And I wish it was as simple as my documents not being well-formed. But the trouble
is that they are well formed, and the command line query

xindice xpath -c xmldb:xindice://localhost:8080/db/testcol -q "/restaurant"

works fine and gives me the correct result, but the URL

http://localhost:8080/cocoon/nina/remote/restaurant

gives me the "XML document must have a top level element." error. So there must be
something in Cocoon that's not configured properly.

For standalone mode, the only cofigurations I can find for Xindice are the following:

1. In the root sitemap, line 199-203:

<map:transformer logger="sitemap.transformer.xmldb" name="xmldb"
src="org.apache.cocoon.transformation.XMLDBTransformer">
      <driver>org.apache.xindice.client.xmldb.embed.DatabaseImpl</driver>
      <base>xmldb:xindice-embed:///db</base>
    </map:transformer>
</map:transformers>

Now, since I am running it in standalone mode, should this be changed to

<map:transformer logger="sitemap.transformer.xmldb" name="xmldb"
src="org.apache.cocoon.transformation.XMLDBTransformer">
      <driver>org.apache.xindice.client.xmldb.DatabaseImpl</driver>
      <base>xmldb:xindice://localhost:8080/db</base>
    </map:transformer>
</map:transformers>

?

2. The other configuration snippet would be the sitemap for the specific folder in
question, in my case one called "nina", located just under the main Cocoon folder.
This is the snippet that matches the url:

<map:pipeline>
    <map:match pattern="remote/**">
      <map:match type="request-parameter"
        pattern="xpath">
        <map:generate src="xmldb:xindice://localhost:8080/db/testcol/{../1}#{1}"/>
        <map:serialize type="xml"/>
      </map:match>
      <map:generate
        src="xmldb:xindice://localhost:8080/db/testcol/{1}"/>
      <map:serialize type="xml"/>
    </map:match>
  </map:pipeline>


Still, with these sitemaps, it still doesn't work (I've tried both versions of the
main sitemp).

I'm thinking of giving up using Xindice through Cocoon, it seems impossible to get
it to work :( But it would be such a neat solution if I only could get them to talk
to eachother. The more I understand of the sitemap configurations, the less I
understand what I have done wrong I why I can't get it to work.

Anyway, if anyone can think of any other configurations for standalone mode to
fiddle with... would be greatly appreciated. And thank you Mark for your efforts.

Nina


> Nina,
>
> First of all, you're very welcome.  I was (and am) writing this on the
> Fedora Core 1 side of my machine, so I used mostly UNIX information.
> Let me see if I can't translate this into Windows/2000 specific
> information.
>
> First of all, my environment variables need translating.  When I say
> $TOMCAT_HOME, in Windows/2000 I should say %TOMCAT_HOME%.  Also, with
> Tomcat 4.1x and 5.x, the environment variable has been changed to
> %CATALINA_HOME%, although some of the Apache documentation is
> inconsistent on this point.
>
> Now to the particulars:
>
> a) In step 3, uncomment the following, since you're on Windows/2000 and
> not UNIX:
>
> <map:match pattern="~*/**">
>       <!-- win32 -->
>  <map:mount
>   check-reload="yes"
>   src="/Documents and Settings/{1}/My Documents/My Website"
>   uri-prefix="~{1}"/>
> </map:match>
>
> b) In step 6, create the My Website folder under your My Documents
> folder.  An easy way to do this is to open My Documents on the desktop,
> right mouse click, select New--->Folder, and name the folder My
> Website.  Please note that it may already be there.
>
> c) In step 7, open the My Website folder and create another folder
> called xsl.  An easy way to do this is to open My Website in My
> Documents on the desktop, right mouse click, select New--->Folder, and
> name the folder xsl.
>
> Now, some potential comments about your documents in the Xindice
> database.  I apologize if you already understand xml document structure,
> so please bare with me.
>
> All xml documents must start with something like the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> The encoding doesn't have to be specified, but you must have at least:
>
> <?xml version="1.0"?>
>
> at the beginning of each document.  That is probably the source of your
> "The XML document must have a top element" error.
>
> Also, your XML document must be well-formed.  Basically, all tags must
> be closed (<tagname> . . . . </tagname> or <tagname/>) and properly
> nested.
>
> Xindice has two basic clients (I'm not sure if the managed driver counts
> as a client) - xindice, and xindice-embed.  The xindice client actually
> calls the real client, xindice-xmlrpc, which works either on local
> network-available Xindice databases.  xindice-embed only works for
> embedded databases within the same Java VM.
>
> When you use your URL xmldb:xindice://localhost:8080/db, you are
> actually using xmldb:xindice-xmlrpc://localhost:8080/db.
>
> Using a specific embedded Xindice database with Tomcat and Cocoon is
> somewhat of a pain on Windows/2000.  You've probably installed Tomcat to
> run as a service on Windows/2000.  There are two consequences of doing
> this.
>
> 1) Trying to start Tomcat with catalina.bat start will silently fail
> since Tomcat is already running as a service.
>
> 2) Changes to catalina.bat will NOT be reflected in your Tomcat that
> runs as a service.
>
> Using an embedded Xindice database gets a little messy, and I can write
> this up as a separate mail message if you wish.  Basically, you have to
> stop the Tomcat service, change the registry information, create an
> appropriate system.xml file for your embedded Xindice database, and then
> start the Tomcat service again.
>
> I am hoping that somewhere buried in the Cocoon code are some hints that
> will allow you to change Cocoon's web.xml to tell Cocoon about an
> embedded Xindice database.  That way, multiple Cocoon applications (in
> different contexts) could use different embedded Xindice databases.  I
> haven't found that information yet, but I've not looked that hard
> either.
>
> Once again, this is a rather lengthy mail message . . .
>
> I hope that clears some things up.
>
> /mde/
> just my two cents . . . .
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019

Posted by Mark Eggers <it...@yahoo.com>.
Nina,

First of all, you're very welcome.  I was (and am) writing this on the
Fedora Core 1 side of my machine, so I used mostly UNIX information. 
Let me see if I can't translate this into Windows/2000 specific
information.

First of all, my environment variables need translating.  When I say
$TOMCAT_HOME, in Windows/2000 I should say %TOMCAT_HOME%.  Also, with
Tomcat 4.1x and 5.x, the environment variable has been changed to
%CATALINA_HOME%, although some of the Apache documentation is
inconsistent on this point.

Now to the particulars:

a) In step 3, uncomment the following, since you're on Windows/2000 and
not UNIX:

<map:match pattern="~*/**">
      <!-- win32 -->
 <map:mount
  check-reload="yes"
  src="/Documents and Settings/{1}/My Documents/My Website" 
  uri-prefix="~{1}"/>
</map:match>

b) In step 6, create the My Website folder under your My Documents
folder.  An easy way to do this is to open My Documents on the desktop,
right mouse click, select New--->Folder, and name the folder My
Website.  Please note that it may already be there.

c) In step 7, open the My Website folder and create another folder
called xsl.  An easy way to do this is to open My Website in My
Documents on the desktop, right mouse click, select New--->Folder, and
name the folder xsl.

Now, some potential comments about your documents in the Xindice
database.  I apologize if you already understand xml document structure,
so please bare with me.

All xml documents must start with something like the following:

<?xml version="1.0" encoding="UTF-8"?>

The encoding doesn't have to be specified, but you must have at least:

<?xml version="1.0"?>

at the beginning of each document.  That is probably the source of your
"The XML document must have a top element" error.

Also, your XML document must be well-formed.  Basically, all tags must
be closed (<tagname> . . . . </tagname> or <tagname/>) and properly
nested.

Xindice has two basic clients (I'm not sure if the managed driver counts
as a client) - xindice, and xindice-embed.  The xindice client actually
calls the real client, xindice-xmlrpc, which works either on local
network-available Xindice databases.  xindice-embed only works for
embedded databases within the same Java VM.

When you use your URL xmldb:xindice://localhost:8080/db, you are
actually using xmldb:xindice-xmlrpc://localhost:8080/db.

Using a specific embedded Xindice database with Tomcat and Cocoon is
somewhat of a pain on Windows/2000.  You've probably installed Tomcat to
run as a service on Windows/2000.  There are two consequences of doing
this.

1) Trying to start Tomcat with catalina.bat start will silently fail
since Tomcat is already running as a service.

2) Changes to catalina.bat will NOT be reflected in your Tomcat that
runs as a service.

Using an embedded Xindice database gets a little messy, and I can write
this up as a separate mail message if you wish.  Basically, you have to
stop the Tomcat service, change the registry information, create an
appropriate system.xml file for your embedded Xindice database, and then
start the Tomcat service again.

I am hoping that somewhere buried in the Cocoon code are some hints that
will allow you to change Cocoon's web.xml to tell Cocoon about an
embedded Xindice database.  That way, multiple Cocoon applications (in
different contexts) could use different embedded Xindice databases.  I
haven't found that information yet, but I've not looked that hard
either.

Once again, this is a rather lengthy mail message . . .

I hope that clears some things up.

/mde/
just my two cents . . . .


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019

Posted by Nina Juliadotter <nv...@it.uts.edu.au>.
> Thank you so much for your extensive and step-by-step reply.
>
> Scroll down to read on...
>
>
>> 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
>> pipelines.
>>
>> 1. Grab cocoon-2.1.4 and build it with either
>> ./build.sh 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 ./build.sh (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
>> Application.
>>
>> 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
>>    testing.
>> 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
>> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>
>> xml-apis.jar
>> xmldb-api-20030701.jar
>> xmldb-common-20030701.jar
>> xmldb-xupdate-20040205.jar
>> xmlrpc-1.1.jar
>>
>> 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
>> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>
>> 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}"/>
>> </map:match>
>>
>> 4. Start up the Cocoon application using the Tomcat
>> Application Manager
>>
>> 5. Verify that
>> http://localhost:8080/cocoon/samples/xmldb/welcome
>> and samples work.
>>
>> 6. Create your public_html directory
>>
>> 7. In that directory, create an xsl subdirectory.
>>
>> 8. Copy
>>
>> $TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl
>>
>> and
>>
>> $TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl
>>
>>  to that new subdirectory.
>>
>> 9. In your public_html directory, create the following
>> simple sitemap.xmap
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <map:sitemap
>> xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>>
>> <!-- ===== Pipelines ======== -->
>>   <map:pipelines>
>>
>> <!-- ====== remote database with styling ====== -->
>>   <map:pipeline>
>>     <map:match pattern="styleremote/**">
>>       <map:match type="request-parameter"
>>          pattern="xpath">
>>       <map:generate
>> src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>       <map:transform src="xsl/xmldb2samples.xsl"/>
>>       <map:transform
>>         src="xsl/simple-samples2html.xsl">
>>         <map:parameter name="contextPath"
>>            value="{request:contextPath}"/>
>>       </map:transform>
>>       <map:serialize/>
>>       </map:match>
>>       <map:generate
>>         src="xmldb:xindice://localhost:8080/db/{1}"/>
>>       <map:transform src="xsl/xmldb2samples.xsl"/>
>>       <map:transform
>>         src="xsl/simple-samples2html.xsl">
>>         <map:parameter name="contextPath"
>>           value="{request:contextPath}"/>
>>       </map:transform>
>>       <map:serialize/>
>>     </map:match>
>>   </map:pipeline>
>>
>> <!-- === remote database without styling ======= -->
>>   <map:pipeline>
>>     <map:match pattern="remote/**">
>>       <map:match type="request-parameter"
>>         pattern="xpath">
>>         <map:generate
>> src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>         <map:serialize type="xml"/>
>>       </map:match>
>>       <map:generate
>>         src="xmldb:xindice://localhost:8080/db/{1}"/>
>>       <map:serialize type="xml"/>
>>     </map:match>
>>   </map:pipeline>
>>
>>   </map:pipelines>
>> </map:sitemap>
>>
>> I apologize for the ugly formatting, but you should
>> get the idea.
>>
>> Now, browse to:
>>
>> http://localhost:8080/cocoon/~user/styleremote/
>>
>
> I'm up to here now, but have some troubles with Windows 2000 and permissions. When I
> go to my url:
>
> http://localhost:8080/cocoon/~nvjuliad/styleremote
>
> I get the following error:
>
> Resource not found.
>
> org.apache.cocoon.ResourceNotFoundException: Resource not found.:
> org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and
> Settings/nvjuliad/My Documents/My Website/ doesn't exist.
>
> cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My
> Documents\My Website (Access is denied)
>
> If I move it from this location, the "(Access is denied)" bit is changed to "(The
> system cannot find the path specified)", so we know it finds it, but can't get
> access to it. I've right-clicked on the My Website folder and under
> Properties/Sharing chosen to "Share this folder", but that didn't make any
> difference. Does anyone know how to get around this?
>
>

I changed it so that I put the content of My Website in a folder called "nina" that
I put just under cocoon. Which, should be possible to access through

http://localhost:8080/cocoon/nina/remote/ or
http://localhost:8080/cocoon/nina/styleremote/

right? I mean, shoudn't this work now finally? But no. Using the /remote/, I get

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the
Refresh button, or try again later.
--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource
'http://localhost:8080/cocoon/nina/remote/'.

and when I try /styleremote/ I get a blank page.

I changed the sitemap to reflect the collection, "testcol", so the
src="xmldb:xindice://localhost:8080/db/{1}" snippets are now
src="xmldb:xindice://localhost:8080/db/testcol/{1}". But same result. And I tried
the URL with valid queries, such as
http://localhost:8080/cocoon/nina/styleremote/restaurant (restaurant is the root of
all my documents in testcol).

Seriously, what I am doing that is so wrong?

I'm a bit suspisous at the fact that xindice can be accessed in embedded mode and
standalone mode, could it be that embedded mode is the default and that that's why
it doesn't connect properly?


>> (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:
>>
>> xmldb:xindice://localhost:8080/db/.
>>
>>
>> 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
>> catalina.sh (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.
>>
>
> How do I actually do this? I mean, trying to execute -Dxindice.configuration in
> Windows commandline doesn't work. I had a look at the registry ("regedit"), but
> wouldn't know what to do where or how. I'm not very good with these things in
> Windows.
>
>> Hope this helps.
>>
>> /mde/
>> just my two cents . . . .
>>
>>
>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> Yahoo! Tax Center - File online by April 15th
>> http://taxes.yahoo.com/filing.html
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> Thanks so much for the help,
> Nina
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


Cheers,
Nina



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat5.019

Posted by Leon Widdershoven <qa...@dds.nl>.
JAVA_OPTS is a shell variable.

It may also be my fault that this went wrong, but what you want to do is
change the variable on top of the file so that the next reading of that
variable yields something with -Dxindice.configuration

I have reviewed the syntax and I think what you should have done (and I was
wrong there) is setting the var with the set command (but still only on top
of the file:
set JAVA_OPTS="%JAVA_OPTS -Dxindice.configuration=/path/to/config"

All the accesses below that point will have a JAVA_OPTS that includes
the new -D thing.

And you may want to review your tomcat/logs/catalina.out for more
information.

Leon

Nina Juliadotter wrote:
> I edited catalina.bat (that's the one getting executed in Windows, isn't it?) so the
> the bottom half now looks like
> 
> rem Execute Java with the applicable properties
> if not "%JPDA%" == "" goto doJpda
> if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
> %_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
> -Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
> %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath
> "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
> :doSecurity
> %_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
> -Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
> %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath
> "%CLASSPATH%" -Djava.security.manager
> -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%"
> -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS%
> %CMD_LINE_ARGS% %ACTION%
> goto end
> :doJpda
> if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
> %_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
> -Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
> %CATALINA_OPTS% -Xdebug
> -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
> %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
> :doSecurityJpda
> %_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
> -Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
> %CATALINA_OPTS%
> -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
> %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
> 
> :end
> 
> A bit hard to read maybe, but all I did was replacing the %JAVA_OPTS" with
> %JAVA_OPTS%="%JAVA_OPTS%
> -Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
> 
> is this correct?
> 
> When I now start the server, it only opens up the tomcat window for a second and
> then closes it again, and hence doesn't start it up at all. What am I doing wrong?
> 
> Thanks, Nina
> 
> 
> 
>>edit catalina.sh in Notepad or something
>>
>>On unix:
>>Add a line:
>>JAVA_OPTS="$JAVA_OPTS -Dxindice.configuration=path/to/system.xml"
>>
>>on top of the file (below the comments or something).
>>
>>That makes catalina call java like:
>>java -Dxindice.configuration <stuff>
>>
>>on windows something like:
>>%JAVA_OPTS%="%JAVA_OPTS% -Dxindice.configuration=/path/to/system.xml"
>>
>>Leon
>>
>>Nina Juliadotter wrote:
>>
>>>Thank you so much for your extensive and step-by-step reply.
>>>
>>>Scroll down to read on...
>>>
>>>
>>>
>>>
>>>>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
>>>>pipelines.
>>>>
>>>>1. Grab cocoon-2.1.4 and build it with either
>>>>./build.sh 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 ./build.sh (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
>>>>Application.
>>>>
>>>>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
>>>>  testing.
>>>>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
>>>>$TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>>>
>>>>xml-apis.jar
>>>>xmldb-api-20030701.jar
>>>>xmldb-common-20030701.jar
>>>>xmldb-xupdate-20040205.jar
>>>>xmlrpc-1.1.jar
>>>>
>>>>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
>>>>$TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>>>
>>>>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}"/>
>>>></map:match>
>>>>
>>>>4. Start up the Cocoon application using the Tomcat
>>>>Application Manager
>>>>
>>>>5. Verify that
>>>>http://localhost:8080/cocoon/samples/xmldb/welcome
>>>>and samples work.
>>>>
>>>>6. Create your public_html directory
>>>>
>>>>7. In that directory, create an xsl subdirectory.
>>>>
>>>>8. Copy
>>>>
>>>>$TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl
>>>>
>>>>and
>>>>
>>>>$TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl
>>>>
>>>>to that new subdirectory.
>>>>
>>>>9. In your public_html directory, create the following
>>>>simple sitemap.xmap
>>>><?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>><map:sitemap
>>>>xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>>>>
>>>><!-- ===== Pipelines ======== -->
>>>> <map:pipelines>
>>>>
>>>><!-- ====== remote database with styling ====== -->
>>>> <map:pipeline>
>>>>   <map:match pattern="styleremote/**">
>>>>     <map:match type="request-parameter"
>>>>        pattern="xpath">
>>>>     <map:generate
>>>>src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>>>     <map:transform src="xsl/xmldb2samples.xsl"/>
>>>>     <map:transform
>>>>       src="xsl/simple-samples2html.xsl">
>>>>       <map:parameter name="contextPath"
>>>>          value="{request:contextPath}"/>
>>>>     </map:transform>
>>>>     <map:serialize/>
>>>>     </map:match>
>>>>     <map:generate
>>>>       src="xmldb:xindice://localhost:8080/db/{1}"/>
>>>>     <map:transform src="xsl/xmldb2samples.xsl"/>
>>>>     <map:transform
>>>>       src="xsl/simple-samples2html.xsl">
>>>>       <map:parameter name="contextPath"
>>>>         value="{request:contextPath}"/>
>>>>     </map:transform>
>>>>     <map:serialize/>
>>>>   </map:match>
>>>> </map:pipeline>
>>>>
>>>><!-- === remote database without styling ======= -->
>>>> <map:pipeline>
>>>>   <map:match pattern="remote/**">
>>>>     <map:match type="request-parameter"
>>>>       pattern="xpath">
>>>>       <map:generate
>>>>src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>>>       <map:serialize type="xml"/>
>>>>     </map:match>
>>>>     <map:generate
>>>>       src="xmldb:xindice://localhost:8080/db/{1}"/>
>>>>     <map:serialize type="xml"/>
>>>>   </map:match>
>>>> </map:pipeline>
>>>>
>>>> </map:pipelines>
>>>></map:sitemap>
>>>>
>>>>I apologize for the ugly formatting, but you should
>>>>get the idea.
>>>>
>>>>Now, browse to:
>>>>
>>>>http://localhost:8080/cocoon/~user/styleremote/
>>>>
>>>
>>>
>>>I'm up to here now, but have some troubles with Windows 2000 and permissions. When
>>>I
>>>go to my url:
>>>
>>>http://localhost:8080/cocoon/~nvjuliad/styleremote
>>>
>>>I get the following error:
>>>
>>>Resource not found.
>>>
>>>org.apache.cocoon.ResourceNotFoundException: Resource not found.:
>>>org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and
>>>Settings/nvjuliad/My Documents/My Website/ doesn't exist.
>>>
>>>cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My
>>>Documents\My Website (Access is denied)
>>>
>>>If I move it from this location, the "(Access is denied)" bit is changed to "(The
>>>system cannot find the path specified)", so we know it finds it, but can't get
>>>access to it. I've right-clicked on the My Website folder and under
>>>Properties/Sharing chosen to "Share this folder", but that didn't make any
>>>difference. Does anyone know how to get around this?
>>>
>>>
>>>
>>>
>>>>(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:
>>>>
>>>>xmldb:xindice://localhost:8080/db/.
>>>>
>>>>
>>>>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
>>>>catalina.sh (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.
>>>>
>>>
>>>
>>>How do I actually do this? I mean, trying to execute -Dxindice.configuration in
>>>Windows commandline doesn't work. I had a look at the registry ("regedit"), but
>>>wouldn't know what to do where or how. I'm not very good with these things in
>>>Windows.
>>>
>>>
>>>
>>>>Hope this helps.
>>>>
>>>>/mde/
>>>>just my two cents . . . .
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>__________________________________
>>>>Do you Yahoo!?
>>>>Yahoo! Tax Center - File online by April 15th
>>>>http://taxes.yahoo.com/filing.html
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>>
>>>
>>>Thanks so much for the help,
>>>Nina
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
> 
> 
> 
> Cheers,
> Nina
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat5.019

Posted by Nina Juliadotter <nv...@it.uts.edu.au>.
I edited catalina.bat (that's the one getting executed in Windows, isn't it?) so the
the bottom half now looks like

rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
-Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
%CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath
"%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
%_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
-Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
%CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath
"%CLASSPATH%" -Djava.security.manager
-Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%"
-Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS%
%CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
-Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
%CATALINA_OPTS% -Xdebug
-Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS%="%JAVA_OPTS%
-Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"
%CATALINA_OPTS%
-Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end

:end

A bit hard to read maybe, but all I did was replacing the %JAVA_OPTS" with
%JAVA_OPTS%="%JAVA_OPTS%
-Dxindice.configuration=%CATALINA_HOME%\webapps\xindice\WEB-INF\system.xml"

is this correct?

When I now start the server, it only opens up the tomcat window for a second and
then closes it again, and hence doesn't start it up at all. What am I doing wrong?

Thanks, Nina


> edit catalina.sh in Notepad or something
>
> On unix:
> Add a line:
> JAVA_OPTS="$JAVA_OPTS -Dxindice.configuration=path/to/system.xml"
>
> on top of the file (below the comments or something).
>
> That makes catalina call java like:
> java -Dxindice.configuration <stuff>
>
> on windows something like:
> %JAVA_OPTS%="%JAVA_OPTS% -Dxindice.configuration=/path/to/system.xml"
>
> Leon
>
> Nina Juliadotter wrote:
>> Thank you so much for your extensive and step-by-step reply.
>>
>> Scroll down to read on...
>>
>>
>>
>>>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
>>>pipelines.
>>>
>>>1. Grab cocoon-2.1.4 and build it with either
>>>./build.sh 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 ./build.sh (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
>>>Application.
>>>
>>>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
>>>   testing.
>>>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
>>>$TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>>
>>>xml-apis.jar
>>>xmldb-api-20030701.jar
>>>xmldb-common-20030701.jar
>>>xmldb-xupdate-20040205.jar
>>>xmlrpc-1.1.jar
>>>
>>>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
>>>$TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>>
>>>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}"/>
>>></map:match>
>>>
>>>4. Start up the Cocoon application using the Tomcat
>>>Application Manager
>>>
>>>5. Verify that
>>>http://localhost:8080/cocoon/samples/xmldb/welcome
>>>and samples work.
>>>
>>>6. Create your public_html directory
>>>
>>>7. In that directory, create an xsl subdirectory.
>>>
>>>8. Copy
>>>
>>>$TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl
>>>
>>>and
>>>
>>>$TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl
>>>
>>> to that new subdirectory.
>>>
>>>9. In your public_html directory, create the following
>>>simple sitemap.xmap
>>><?xml version="1.0" encoding="UTF-8"?>
>>>
>>><map:sitemap
>>>xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>>>
>>><!-- ===== Pipelines ======== -->
>>>  <map:pipelines>
>>>
>>><!-- ====== remote database with styling ====== -->
>>>  <map:pipeline>
>>>    <map:match pattern="styleremote/**">
>>>      <map:match type="request-parameter"
>>>         pattern="xpath">
>>>      <map:generate
>>>src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>>      <map:transform src="xsl/xmldb2samples.xsl"/>
>>>      <map:transform
>>>        src="xsl/simple-samples2html.xsl">
>>>        <map:parameter name="contextPath"
>>>           value="{request:contextPath}"/>
>>>      </map:transform>
>>>      <map:serialize/>
>>>      </map:match>
>>>      <map:generate
>>>        src="xmldb:xindice://localhost:8080/db/{1}"/>
>>>      <map:transform src="xsl/xmldb2samples.xsl"/>
>>>      <map:transform
>>>        src="xsl/simple-samples2html.xsl">
>>>        <map:parameter name="contextPath"
>>>          value="{request:contextPath}"/>
>>>      </map:transform>
>>>      <map:serialize/>
>>>    </map:match>
>>>  </map:pipeline>
>>>
>>><!-- === remote database without styling ======= -->
>>>  <map:pipeline>
>>>    <map:match pattern="remote/**">
>>>      <map:match type="request-parameter"
>>>        pattern="xpath">
>>>        <map:generate
>>>src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>>        <map:serialize type="xml"/>
>>>      </map:match>
>>>      <map:generate
>>>        src="xmldb:xindice://localhost:8080/db/{1}"/>
>>>      <map:serialize type="xml"/>
>>>    </map:match>
>>>  </map:pipeline>
>>>
>>>  </map:pipelines>
>>></map:sitemap>
>>>
>>>I apologize for the ugly formatting, but you should
>>>get the idea.
>>>
>>>Now, browse to:
>>>
>>>http://localhost:8080/cocoon/~user/styleremote/
>>>
>>
>>
>> I'm up to here now, but have some troubles with Windows 2000 and permissions. When
>> I
>> go to my url:
>>
>> http://localhost:8080/cocoon/~nvjuliad/styleremote
>>
>> I get the following error:
>>
>> Resource not found.
>>
>> org.apache.cocoon.ResourceNotFoundException: Resource not found.:
>> org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and
>> Settings/nvjuliad/My Documents/My Website/ doesn't exist.
>>
>> cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My
>> Documents\My Website (Access is denied)
>>
>> If I move it from this location, the "(Access is denied)" bit is changed to "(The
>> system cannot find the path specified)", so we know it finds it, but can't get
>> access to it. I've right-clicked on the My Website folder and under
>> Properties/Sharing chosen to "Share this folder", but that didn't make any
>> difference. Does anyone know how to get around this?
>>
>>
>>
>>>(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:
>>>
>>>xmldb:xindice://localhost:8080/db/.
>>>
>>>
>>>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
>>>catalina.sh (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.
>>>
>>
>>
>> How do I actually do this? I mean, trying to execute -Dxindice.configuration in
>> Windows commandline doesn't work. I had a look at the registry ("regedit"), but
>> wouldn't know what to do where or how. I'm not very good with these things in
>> Windows.
>>
>>
>>>Hope this helps.
>>>
>>>/mde/
>>>just my two cents . . . .
>>>
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Tax Center - File online by April 15th
>>>http://taxes.yahoo.com/filing.html
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>
>>
>> Thanks so much for the help,
>> Nina
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


Cheers,
Nina



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019

Posted by Leon Widdershoven <qa...@dds.nl>.
edit catalina.sh in Notepad or something

On unix:
Add a line:
JAVA_OPTS="$JAVA_OPTS -Dxindice.configuration=path/to/system.xml"

on top of the file (below the comments or something).

That makes catalina call java like:
java -Dxindice.configuration <stuff>

on windows something like:
%JAVA_OPTS%="%JAVA_OPTS% -Dxindice.configuration=/path/to/system.xml"

Leon

Nina Juliadotter wrote:
> Thank you so much for your extensive and step-by-step reply.
> 
> Scroll down to read on...
> 
> 
> 
>>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
>>pipelines.
>>
>>1. Grab cocoon-2.1.4 and build it with either
>>./build.sh 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 ./build.sh (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
>>Application.
>>
>>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
>>   testing.
>>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
>>$TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>
>>xml-apis.jar
>>xmldb-api-20030701.jar
>>xmldb-common-20030701.jar
>>xmldb-xupdate-20040205.jar
>>xmlrpc-1.1.jar
>>
>>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
>>$TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>>
>>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}"/>
>></map:match>
>>
>>4. Start up the Cocoon application using the Tomcat
>>Application Manager
>>
>>5. Verify that
>>http://localhost:8080/cocoon/samples/xmldb/welcome
>>and samples work.
>>
>>6. Create your public_html directory
>>
>>7. In that directory, create an xsl subdirectory.
>>
>>8. Copy
>>
>>$TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl
>>
>>and
>>
>>$TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl
>>
>> to that new subdirectory.
>>
>>9. In your public_html directory, create the following
>>simple sitemap.xmap
>><?xml version="1.0" encoding="UTF-8"?>
>>
>><map:sitemap
>>xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>>
>><!-- ===== Pipelines ======== -->
>>  <map:pipelines>
>>
>><!-- ====== remote database with styling ====== -->
>>  <map:pipeline>
>>    <map:match pattern="styleremote/**">
>>      <map:match type="request-parameter"
>>         pattern="xpath">
>>      <map:generate
>>src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>      <map:transform src="xsl/xmldb2samples.xsl"/>
>>      <map:transform
>>        src="xsl/simple-samples2html.xsl">
>>        <map:parameter name="contextPath"
>>           value="{request:contextPath}"/>
>>      </map:transform>
>>      <map:serialize/>
>>      </map:match>
>>      <map:generate
>>        src="xmldb:xindice://localhost:8080/db/{1}"/>
>>      <map:transform src="xsl/xmldb2samples.xsl"/>
>>      <map:transform
>>        src="xsl/simple-samples2html.xsl">
>>        <map:parameter name="contextPath"
>>          value="{request:contextPath}"/>
>>      </map:transform>
>>      <map:serialize/>
>>    </map:match>
>>  </map:pipeline>
>>
>><!-- === remote database without styling ======= -->
>>  <map:pipeline>
>>    <map:match pattern="remote/**">
>>      <map:match type="request-parameter"
>>        pattern="xpath">
>>        <map:generate
>>src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>>        <map:serialize type="xml"/>
>>      </map:match>
>>      <map:generate
>>        src="xmldb:xindice://localhost:8080/db/{1}"/>
>>      <map:serialize type="xml"/>
>>    </map:match>
>>  </map:pipeline>
>>
>>  </map:pipelines>
>></map:sitemap>
>>
>>I apologize for the ugly formatting, but you should
>>get the idea.
>>
>>Now, browse to:
>>
>>http://localhost:8080/cocoon/~user/styleremote/
>>
> 
> 
> I'm up to here now, but have some troubles with Windows 2000 and permissions. When I
> go to my url:
> 
> http://localhost:8080/cocoon/~nvjuliad/styleremote
> 
> I get the following error:
> 
> Resource not found.
> 
> org.apache.cocoon.ResourceNotFoundException: Resource not found.:
> org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and
> Settings/nvjuliad/My Documents/My Website/ doesn't exist.
> 
> cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My
> Documents\My Website (Access is denied)
> 
> If I move it from this location, the "(Access is denied)" bit is changed to "(The
> system cannot find the path specified)", so we know it finds it, but can't get
> access to it. I've right-clicked on the My Website folder and under
> Properties/Sharing chosen to "Share this folder", but that didn't make any
> difference. Does anyone know how to get around this?
> 
> 
> 
>>(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:
>>
>>xmldb:xindice://localhost:8080/db/.
>>
>>
>>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
>>catalina.sh (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.
>>
> 
> 
> How do I actually do this? I mean, trying to execute -Dxindice.configuration in
> Windows commandline doesn't work. I had a look at the registry ("regedit"), but
> wouldn't know what to do where or how. I'm not very good with these things in
> Windows.
> 
> 
>>Hope this helps.
>>
>>/mde/
>>just my two cents . . . .
>>
>>
>>
>>
>>
>>__________________________________
>>Do you Yahoo!?
>>Yahoo! Tax Center - File online by April 15th
>>http://taxes.yahoo.com/filing.html
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
> 
> 
> Thanks so much for the help,
> Nina
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org