You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by vupt <vu...@yahoo.com> on 2000/05/26 19:22:12 UTC

what is relationship between cocoon and java servlet?

Hi,

Could someone clarify for me the relationship between
Cocoon and Java Servlet? I've combed through a lot of
the documentation but I am still unclear. 

Here are some things I've read about. Could someone
tie it together and perhaps elaborate on it?
1)Cocoon is based on the immensly popular Java servlet
architecture[http://www.oreilly.com/catalog/javaxml/chapter/ch09.html]

2)Need to configure the servlet engine to use Cocoon
in order to tell it which requests Cocoon should
handle
[http://www.oreilly.com/catalog/javaxml/chapter/ch09.html]

3)Cocoon is a servlet [cocoon faq]

4)Cocoon needs a servlet engine in order to support
servlet operation and dynamic request handling [cocoon
install]


__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/

Re: what is relationship between cocoon and java servlet?

Posted by Uli Mayring <ul...@denic.de>.
On Fri, 26 May 2000, sudhi wrote:

> Cocoon is a Servlet, which serves all the user requests which has a .xml
> at the end.
> How to map all the .xml requests to Cocoon is done by configuring
> servlet engine.

Only in the case where the servlet engine acts as a web server. The web
server is responsible for this mapping, it has to decide which URIs it
asks the servlet engine to resolve.

> A request comes in which is requesting an xml file. The request is
> passed to Servlet engine. Servlet engine then sends this request to
> Cocoon, then Cocoon which itself is a servlet serves this request.

This has nothing to do with the .xml extension, the webserver can send any
URI to the servlet engine. What is important is what servlet the request
is sent to. If you specify in your web server that all files with
extension .xml are sent to the URI
http://server.myorg.tld:4444/myservlets/org.apache.cocoon.Cocoon,
then what you described happens. Of course only if Cocoon actually runs in
the servlet zone myservlets and the servlet server serving that zone runs
on host server.myorg.tld and listens on port 4444.

In our case, for example, we have many servlet servers running on
many machines and only some of them run cocoon. Others run other
servlets and yet others run cocoon and other servlets. We even have
machines running more than one servlet server. So, our processing
workflow is driven by the URI that the user request. Within the URI there
are three parts that you can use to define your processing workflow:

1. Hostname/IP address
2. Port
3. Servlet Zone

Within cocoon itself you can further refine your workflow with processing
instructions, but that is kind of ugly. Much better will be cocoon2 with
the sitemap.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


Re: what is relationship between cocoon and java servlet?

Posted by sudhi <su...@planet.net>.
Cocoon is a Servlet, which serves all the user requests which has a .xml
at the end. 

How to map all the .xml requests to Cocoon is done by configuring
servlet engine. 

Since cocoon is a servlet it needs a servlet engine to run.

Here is how it works -

A request comes in which is requesting an xml file. The request is
passed to Servlet engine. Servlet engine then sends this request to
Cocoon, then Cocoon which itself is a servlet serves this request.

HTH

vupt wrote:
> 
> Hi,
> 
> Could someone clarify for me the relationship between
> Cocoon and Java Servlet? I've combed through a lot of
> the documentation but I am still unclear.
> 
> Here are some things I've read about. Could someone
> tie it together and perhaps elaborate on it?
> 1)Cocoon is based on the immensly popular Java servlet
> architecture[http://www.oreilly.com/catalog/javaxml/chapter/ch09.html]
> 
> 2)Need to configure the servlet engine to use Cocoon
> in order to tell it which requests Cocoon should
> handle
> [http://www.oreilly.com/catalog/javaxml/chapter/ch09.html]
> 
> 3)Cocoon is a servlet [cocoon faq]
> 
> 4)Cocoon needs a servlet engine in order to support
> servlet operation and dynamic request handling [cocoon
> install]
> 
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org