cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens" <at...@hotmail.com>
Subject RE: First Cocoon application help needed
Date Thu, 30 Mar 2006 13:13:42 GMT
>From: jigo jacob <jigo_jacob@yahoo.com>
>Date: Thu, 30 Mar 2006 04:46:04 -0800 (PST)
>
>I have downloaded the latest cocoon release 2.1.8.
>After running the build I have copied the webapp
>folder instead of the war file in the
>TOMCAT_HOME/webapps directory. I  then accessed the
>http://127.0.0.1:8080/cocoon/ I was able to see the
>cocoon welcome page. I hope that confirms proper
>installation of the cocoon. I am using jdk1.5.0.6 and
>Tomcat/5.0.28
>    I am trying to run a example in the Java&XML 2
>edition book.
>
>I put 2 files in the WEB-INF folder cocoon.properties
>and web.xml
>
>I aslo add two directories cocoon/XSL and cocoon/DTD
>containing the xsl and dtd files respectively
>
>I copied the contents.xml which contains of the
>java&xml book in xml format
>
>When I type the URL,
>http://127.0.0.1:8080/cocoon/contents.xml
>I get an error message
>org.apache.cocoon.ResourceNotFoundException: No
>pipeline matched request: contents.xml
>
>This is my first cocoon application. Does anybody know
>what is going wrong?. If anybody has a simple xml
>cocoon application to run, please help so I can get a
>hang of cocoon.

Do you have a sitemap pipeline that matches the content.xml URL?  The "No
pipeline matched request" message would suggest not.

Just because the file is present on disk, doesn't mean cocoon will serve it 
up, unless there's a pipeline which tells it to do so.  You need to edit 
sitemap.xmap and define a pipeline that reads the file (with the file 
generator), possibly does things to it via transformers (e.g. applying your 
stylesheet templates to it with the XSL transformer), then serialises the 
results to the browser in a suitable form (with the HTML or XML serialiser).

The thing to remember is it's the pipelines' matchers that define the URL 
space in your web app, not the contents of the filesystem.  You can organise 
things into subdirectories corresponding to the URL paths if you wish, but 
it's not compulsory.  In fact, if you wanted, you could run the whole site 
with a single sitemap file and everything else read from a database (or 
content management repository, or web service, etc.) with normal filenames & 
extensions in all the URLs so that the user can't tell the difference!  Or 
you could define a single pipeline with a reader that takes the full path & 
filename from the requested URL, looks for a static file of that name under 
your web app's root directory, and streams it back with the appropriate mime 
type.  Not that you'd really want to do that, though, since Apache would 
probably do the same job a lot faster...


Andrew.



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


Mime
View raw message