cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hall, Joe" <Joe.H...@Avnet.com>
Subject RE: Servlets and Cocoon2.
Date Wed, 30 Jan 2002 14:01:18 GMT
Yes, it is in the package testcocoonproject.
Any other ideas?

-----Original Message-----
From: Chitharanjan Das [mailto:cdas@accordiasys.com]
Sent: Tuesday, January 29, 2002 7:22 PM
To: cocoon-users@xml.apache.org
Subject: RE: Servlets and Cocoon2.


Hello,
	Is the package information for the servlet classes
testcocoonproject ?
	I think just by copying the class files into a subdirectory of
WEB-INF classes is not sufficient, the servlet classes should have the
necessary package info ...

Regds,
Chiths

I saw this message in the archives, but I can't seem to get servlets and
Cocoon2 to work.
I think my problem is getting the servlet to run.  It's like it is not
in
the classpath.
I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet.
Here's the entry from my sitemap file:
  <map:match pattern="testcocoonproject/*">
     <map:generate
src="http://localhost:9090/Cocoon/testcocoonproject.{1}"/>
     <map:transform src="stylesheets/page/simple-page2html.xsl"/>
     <map:serialize type="html"/>
   </map:match

I would expect when I enter the URL
(http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the
servlet would execute but I get a an error message.  It picks up the
testcocoonproject/*, but TestServlet yeilds the same result as any other
non-existant name.  

org.apache.cocoon.ProcessingException: Could not read resource
http://localhost:9090/Cocoon/testcocoonproject.TestServlet

Do you have any suggestions on how to get this to work or samples of
servlet
output to Cocoon for XSL Transformation?

Thanks,

Joe Hall

--------------INCLUDED MESSAGE FROM THE COCOON
ARCHIVES-------------------
Yes, working now.  I sent the following yesterday.  Thanks very much for
your help.

Thanks to Vadim Gritsenko and David Rosenstrauch.
This scheme now works.
Here is what I learned that may be valuable to others who would like to
write servlets that output XML and would like for the XML to be input to
an
XLS Transformation.

The sitemap entry:
   <map:match pattern="servlet23/*">
     <map:generate src="http://cb:8080/examples/servlet/servlet23.{1}"/>
     <map:transform src="stylesheets/servlet23/{1}"/>
     <map:serialize type="html"/>
   </map:match>
---------------------
where
. servlet23 is a package name; this makes the matching straightforward.
. the generate src entry is the servlet as externally referencable: note
that if you address it from a browser you will get xml that you can look
at
for debug
. the stylesheet is pathed from cocoon root.
---------------------------------------------------------------------
Debugging required looking at:
the logs in %tomcathome%\logs
and %tomcathome%\webapps\cocoon\WEB-INF\logs
------------------------------------------------------------------------
---
Thanks to all developers for a great system.

---------------------------END INCLUDED
MESSAGE-------------------------------------------------

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message