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 15:48:05 GMT
I think servlets may not be the solution.  
The developer docs for Cocoon 2 are not complete.
What is the recommended way of running Java code in Cocoon2 without the use
of XSP?

I haven't seen any documentation on this or how to configure Cocoon to run
it after I write the code.
I have existing Java code that is currently in servlets.  I would like to
get it to run in Cocoon.
In Cocoon 1 we used Producers.  What's the equivalent of a Producer in
Cocoon 2?  Will I still have access to the HttpRequest object?

How would you do this?

Thank you all very much for your help.

Joe Hall

-----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