Hi guys,
I am new to Cocoon, but I have read the FAQ and tried searching some archives as well
as on Google, and haven't found the solution to this. Still, I am *really* sorry if
this has been touched on before.
Anyhow, onto the problem. I'm following along in the book Cocoon: Building XML
Applications and trying to get the "Hello World" example to work. For ultra
simplicity I modified sitemap.xmap so that the <map:pipelines> section is ONLY the
following (after backing up the original sitemap.xmap, of course):
<map:pipelines>
<map:pipeline>
<map:match pattern="helloworld">
<map:generate src="helloworld.xml"/>
<map:transform src="helloworld2html.xsl"/>
<map:serialize/>
</map:match>
</map:pipeline>
</map:pipelines>
What's strange is that even after stopping and restarting Tomcat, when I go to
http://localhost:8080/cocoon, the original Cocoon welcome page comes up that says
something like "Congratulations, you got me running". I flushed the cache in
Konqueror and turned off its cache as well. Also, here's the <sitemap> tag in
$COCOON_HOME/WEB-INF/cocoon.xconf:
<sitemap check-reload="yes" class="org.apache.cocoon.sitemap.SitemapManager"
file="sitemap.xmap" logger="sitemap" reload-method="synchron"/>
The check-reload and reload-methods look like what they should be for the sitemap to
be reloaded upon being changed and before serving any new requests.
Ok, now here's the contents of the helloworld.xml file:
<?xml version="1.0">
<document>
<text>Hello World</text>
</document>
And of the helloworld2html.xsl file:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="document">
<html>
<body>
<h1><xsl:value-of select="text"/></h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Btw, both of these files are in $COCOON_HOME. Here is the error I get when I try to
load http://localhost:8080/cocoon/helloworld:
"The requested URI "/cocoon/helloworld" was not found."
There is no stacktrace given. So..with the new sitemap it *can't* map the URI
helloworld and yet it can still find the files for http://localhost:8080/cocoon. This
is really baffling me.
Lastly, here's my version info:
Cocoon 2.0.3 (latest stable release, obtained in binary form & meant for JDK 1.4,
which I have)
Tomcat 4.1.12 (just obtained about a week ago in binary form)
JDK: 1.4
OS: Redhat 7.3
I would be very happy if one of you could take the time to point me in the right
direction. I'm a newbie, I know, but I'd like to become the next happy Cocoon user.
All the best,
Sonny
_____________________________________________________________
Conserve wilderness with a click (free!) and get your own EcologyFund.net email
(free!) at http://www.ecologyfund.com.
_____________________________________________________________
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB,
POP & more! http://www.everyone.net/selectmail?campaign=tag
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>