Alexander Schatten wrote:

Again thank you for answers, I have still not advanced for one millimeter, though again trying for some long time...

the details:

Upayavira wrote:


I believe this (<uri>) is now fixed in CVS. <uris> is a new feature that allows you to process groups of uris, having independant options with each group, e.g. one that follows links, and one that doesn't. You can also describe a link with name="xxx" and then do cocoon cli -xconf cli.xconf -n xxx (I think it's -n) which will only process URIs in your <uris name="xxx"> set.

I think I've updated the docs in CVS, so if you're using CVS cocoon, but looking at the online docs, you'll not see these doc changes.


all right; so I thought I start from scratch:

(1) I got the most recent cvs version from cocoon: 2.1.3-dev;

(2) installed it with jetty and added my webapp "cocoon-day"

(3) it works in "normal" cocoon mode fine as ever.

As a servlet, you mean?


(4) I tried to fix the things you mentioned, see below:

(2) I also tried to use only command line options, however; I hardly understand what the uri concept and parameters...?!


Can you say more about what you don't understand? If you don't understand it, maybe others don't and thus we need to improve the docs.

there are so many confusing things; I just know wget for example: I use an URL there, and it gets the files; recursively or not; I assume similar functionality from cocoon: but there is:


  <!--+
      |  Specifies a user agent string to the sitemap when
      |  generating the site.
      +-->
  <!--
  <user-agent>xxx</user-agent>
  -->

  <!--+
      |  Specifies an accept string to the sitemap when generating
      |  the site.
      +-->
  <accept>*/*</accept>


what is an "user agent"???

These options will almost certainly be there in wget too, and they're optional. A browser is a User agent, and browsers tell the server what browser they are using a 'user agent' string. This is what is referred to here.


Accepts tells the server (Cocoon here) what the user agent can accept, e.g. your Cocoon site could serve jpg by default, but if an accept string includes image/png, then it serves png instead, all transparent to the user. Again, you can just accept the default.

why would I want to send an "accept" string to the sitemap?? what should this mean? I provide an URL later on, so what is this for??

Because you might have configured your sitemap to select or match upon the accept string. But most people don't.


  <include pattern="**"/>
  <exclude pattern="docs/apidocs/**"/>

whats this again? the three things I copied from the cli.xconf simply make no sense for me. again: I provide an URL or more then one URL later on; so what should these "filters" be good for? no idea

Because, if you follow links, you might not want all links to be followed. This allows you to specify exactly when they are followed and when not.


then:

<uri type="replace" src-prefix="samples/" src="hello-world/hello.html"
dest="build/dest/hello-world.html"/>


o.k. this is lets say 50% clear to me: but why the separation to src-prefix and src? what does the type really mean (append/insert/replace)? no idea yet.

The src-prefix isn't included in the URI of the file that is written to disk, whereas the src is. Actually, in the example above, because the type is replace, the src-prefix isn't needed. This could equally be achieved with src-prefix="" src="samples/hello-world/hello.html"


maybe it would become clearer, when I could try my example which is unfortunately still not running.

Let's hope so, or maybe the docs could be extended. - the person who knows something best isn't always the best person to write user docs!


(3) I came so far with e.g. the code below the line (and the same result with commanline options), that cocoon cli starts, but with the exceptions:

"Cannot find CatalogManager.properties"


Fixed in CVS I believe.


yes, but other problems occur, see below


"Opening database: /usr/java/jakarta-tomcat-5.0.9/webapps/cocoon/WEB-INF/db/cocoondb
HSQLDB server 1.7.1 is running
Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly"


That's because your Cocoon has the HSQLDB block compiled in. I use the CLI with only minimal blocks compiled, which is advisable.


o.k. I tried to compile cocoon with "minimal" blocks. the problem here again: no idea which blocks I could leave away. I played around for some time; dependency problems occured... finally after some hours I gave up, because compilation always takes between 5 and 20 minutes (aaaarrg, why is there no binary distribution, how came to this idea???)

Just remove all blocks, and add them back as you need them.


finally I decided to simply exclude the hsqldb, and at least this hsqldb matter is not occuring again.

Good.


What version of Cocoon are you running?

Are you able to rebuild with less blocks?

see above.


o.k. to the last unsuccessful steps now:

(5) I use the cli.xconf in the cocoon distribution, I only added my url to the file and leave everything else the same

<uri type="replace"
       src-prefix="cocoon-day/"
       src="index.html"
       dest="build/dest/index.html"/>

{ (5b) btw. I also tried it with some other config file I used recently, both times the same result: }

(6) ./cocoon.sh cli -x cli.xconf

(7) result is:

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at Loader.invokeMain(Unknown Source)
at Loader.run(Unknown Source)
at Loader.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionBindingListener
... and so on

Hmm. I've just updated to the current CVS, and now I'm getting the same. Don't know what that is. I'll look into it.





I find nothing like a "Binding Listener" in the build.properties, at least *I* did not find it.

So again no more ideas on my side.

What I do not understand is, why not even the cli delivered with cocoon works with the cocoon samples in the default installation (I only removed hsqldb); I believe, that this is really not "optimal". I think the cli is really complex enough and it would be advantageous if at least the delivered example would work...


I agree - see my reply to your other email. Unfortunately, it seems that some changes to other parts of Cocoon have broken the CLI, which is not good.

Regards, Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to