File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Problems with Cocoon and Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problems with Cocoon and Struts" Watch "Problems with Cocoon and Struts" New topic

Problems with Cocoon and Struts

Mariusz Wojcik

Joined: Sep 29, 2003
Posts: 1
I'd like to write web-application based on Model 2X, but I can't integrate libraries Cocoon and Struts. I'm using
server Tomcat 4.0.6, Struts 1.1, Cocoon 2.1, and Struts - Cocoon Plug-in (struts-cocoon.0.2.jar).
1) I'm wondeing if each application need its own configuration file sitemap.xmap or all applications are described in ONE global configuration
file (located in $CATALINA_HOME\webapps\cocoon - directory).
2) I tried to write very simple application based on Cocoon. I created application
directory ($CATALINA_HOME\webapps\cookbook) - inside of it I created two very simple
xml files, and configuration file - sitemap.xmap.
Inside of my local sitemap.xmap I added this code:
<map ipeline>
<map:match pattern="cookbook/">
<map:generate type="directory" src="cookbook">
<map arameter name="include" value=".*\.xml"/>
<map:transform src="stylesheets/system/directory2html.xslt"/>
</map ipeline>
When I tried to test it, and wrote: http://localhost:8080/cookbook/ I expected
the list of my *.xml files, but I got 404 - Apache Tomcat Error:
************Apache Tomcat/4.0.6 - HTTP Status 404 - /cookbook/********
description: The requested resource (/cookbook/) is not available
My Cocoon is installed in directory: $CATALINA_HOME\webapps\cocoon.
What I'm doing wrong? Should I modify global sitemap.xmap file (If Yes - How?) ?
I know that that are very basic problems - but those are my first step in Cocoon. I'm asking for help.
Best regards
Mariusz Wojcik
I agree. Here's the link:
subject: Problems with Cocoon and Struts
It's not a secret anymore!