cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Ramsdale" <jefe...@earthlink.net>
Subject Trouble integrating a servlet
Date Wed, 10 Sep 2003 19:16:54 GMT
I'm following the instructions at
http://wiki.cocoondev.org/Wiki.jsp?page=IntegrateAServlet and I receive a
Resource not found error:

org.apache.cocoon.ResourceNotFoundException: Could not get resource
file:/F:/Cocoon/webapp/Amazon/AmazonServlet:
org.apache.excalibur.source.SourceNotFoundException:
file:/F:/Cocoon/webapp/Amazon/AmazonServlet doesn't exist.

My servlet spits out HTML that I mean to convert to XHTML to send through my
pipeline.

Here's my pipeline snippet from my Amazon subsitemap:

      <map:pipeline match="AmazonService">
        <map:generate src="AmazonServlet" type="html" />
        <map:serialize />
      </map:pipeline>

Here's my web.xml snippet:

      <servlet>
        <!-- name used to refer to servlet -->
        <servlet-name>AmazonService</servlet-name>
        <!-- fully-specified class name of servlet -->
        <servlet-class>AmazonServlet</servlet-class>
      </servlet>

      <servlet-mapping>
        <servlet-name>AmazonService</servlet-name>
        <!-- the URL path at which the servlet is mounted -->
        <url-pattern>/Amazon/AmazonService</url-pattern>
      </servlet-mapping>

The error shows that my page request is properly mapped to the
AmazonServlet. I've dropped the .jar into my cocoon-home/WEB-INF/lib. The
servlet is not part of a package for this simple example, hence the simple
servlet-class. Of course I've restarted Jetty before testing.

Question... The error shows that Cocoon is looking for the AmazonServlet in
a particular directory. I do have a copy of the class there, but it's also
packaged in a .jar in the lib directory. The Wiki page says it should be
looking for the file in the .jar, so why the error message?

Any hints? Thanks!

Jeff




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


Mime
View raw message