You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Heath Stewart <hs...@esotericrealm.com> on 2001/11/27 18:05:51 UTC

Cocoon or Tomcat with Servlets/Taglibs?

I'm trying to decide whether or not to use Cocoon or just Tomcat (via mod_webapp with Apache/SSL) with Servlets, JSP, and Taglibs. What does this list think? I've done stuff with Cocoon, but frankly, it's more complicated to map servlets and tag libs which I would use extensively in my site, not to mention it's easy to build an entire site based on Tomcat with Forte for Java, since it's all built in. I can also create taglibs and have an <xml> tag or something that I would then use Xerces and Xalan to transform the source XML and XSL files, maybe even the FOP library for some kind of print servlet. Isn't that basically what Cocoon is doing with the sitemap, just mapping requests for files (like **.html to **.xml) to a Java class(es) using Xerces and Xalan to transform the source?

Heath Stewart
Network Administrator / Web Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu

Re: Cocoon or Tomcat with Servlets/Taglibs?

Posted by David Rosenstrauch <da...@dti.net>.
I guess another way to look at it is:  what is cocoon well suited for, and what is it less well suited for?

 From that perspective, you might want to use cocoon if:

* you need to serve the same content, but on different devices.  Cocoon is good at dynamically generating the presentation you need.

* your content is already very heavily xml

* you believe very strongly in the cocoon philosophy of separation of content, logic, and presentation (or want to move away from JSP because of its lack of that separation)


You might not want to use cocoon if:

* Your pages are developed by page designers using a templating system

* You prefer a non-XML solution like JSP or Struts


etc.


HTH.


DR


At 06:26 PM 11/27/01 +0100, you wrote:
>Interesting question...
>basically I agree with you... Cocoon is *just* a framework, so its task is
>to give you one (or more) way to do things.
>It oblige you and force to use a strong structure (sitemap, Generators,
>transformers)...
>
>Everything you do with cocoon can be done by servlets...
>but remember that even servlets are a "evolution" of old cgi-bins written in
>perl/C...
>
>There are a lots of reasons that can make you prefer XML to HTML, Java to
>C... Cocoon to self-made-stuff!
>I think the most important are always the same: speed of development,
>separation of logic from content, a STANDARD way..... an many more reasons.
>
>Anyway, I hope Cocoon become soon a more widely supported standard. I belive
>that soon there will be a lot of new configuration tools and a better
>documentation.
>
>- Tomás.
>
>----- Original Message -----
>From: "Heath Stewart" <hs...@esotericrealm.com>
>To: <co...@xml.apache.org>
>Sent: Tuesday, November 27, 2001 6:05 PM
>Subject: Cocoon or Tomcat with Servlets/Taglibs?
>
>
>I'm trying to decide whether or not to use Cocoon or just Tomcat (via
>mod_webapp with Apache/SSL) with Servlets, JSP, and Taglibs. What does this
>list think? I've done stuff with Cocoon, but frankly, it's more complicated
>to map servlets and tag libs which I would use extensively in my site, not
>to mention it's easy to build an entire site based on Tomcat with Forte for
>Java, since it's all built in. I can also create taglibs and have an <xml>
>tag or something that I would then use Xerces and Xalan to transform the
>source XML and XSL files, maybe even the FOP library for some kind of print
>servlet. Isn't that basically what Cocoon is doing with the sitemap, just
>mapping requests for files (like **.html to **.xml) to a Java class(es)
>using Xerces and Xalan to transform the source?
>
>Heath Stewart
>Network Administrator / Web Developer
>College of Veterinary Medicine
>Iowa State University
>http://www.vetmed.iastate.edu
>
>
>
>---------------------------------------------------------------------
>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: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Cocoon or Tomcat with Servlets/Taglibs?

Posted by David Rosenstrauch <da...@dti.net>.
At 11:38 AM 11/27/01 -0600, you wrote:
>...not to mention Cocoon loads a lot of libraries I'll never use but that
>Cocoon depends on, like Batik, which Java 1.4 can do without.


You might want to do what I've done:

I've set up a separate dir for my app - separate from my /cocoon directory - and that's where I run my app out of.

This dir is a copy of the /cocoon dir, but I've tailored it to remove unnecessary libs like Batik (since I know my app isn't using SVG) and that trims the list of loaded libs a bit.


DR


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Cocoon or Tomcat with Servlets/Taglibs?

Posted by Heath Stewart <hs...@esotericrealm.com>.
...not to mention Cocoon loads a lot of libraries I'll never use but that
Cocoon depends on, like Batik, which Java 1.4 can do without.

Heath Stewart
Network Administrator / Web Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu
----- Original Message -----
From: "Heath Stewart" <hs...@esotericrealm.com>
To: <co...@xml.apache.org>
Sent: Tuesday, November 27, 2001 11:35 AM
Subject: Re: Cocoon or Tomcat with Servlets/Taglibs?


> Oh, I agree that XML is great. I've been following it for years and
already
> employ *heavy* XML usage on the ISU College of Veterinary Medicine site I
> designed and implemented, only it uses ASP and ASP.NET. I could never
> afford - nor would I want - an IIS server, so I have Apache/Tomcat to work
> with. I'm just trying to figure out if I should take the time and create a
> huge sitemap with all the functionality I want rooted at a different
> directory so that I can still have my Netscape Roaming profiles app setup,
> all my users home directories that are probably just plain HTML files, and
> all my SSL-enabled sites, as well as my WebCVS. Once I use WebAppDeploy
with
> cocoon as "/", everything else on the site is screwed. I currently have it
> mounted at /c2 , but I'd rather it just work as "/". I've also looked into
> how to use servlets with Cocoon and it isn't pretty, not to mention
> everytime I need to add some basic functionality, I need to restart
cocoon,
> then httpd after tomcat restarts. This is annoying, especially for a
> personal site that is always in development using new technology and
> techniques. For this reason, I'd almost prefer just a plain Java server. I
> could implement my navbars using taglibs instead of XInclude, which would
be
> easier anyway, sort of like how ASP.NET has the <asp:xml> tag to transform
> source according to your will.
>
> Heath Stewart
> Network Administrator / Web Developer
> College of Veterinary Medicine
> Iowa State University
> http://www.vetmed.iastate.edu
> ----- Original Message -----
> From: "Tomas Espeleta" <to...@digival.es>
> To: <co...@xml.apache.org>
> Sent: Tuesday, November 27, 2001 11:26 AM
> Subject: Re: Cocoon or Tomcat with Servlets/Taglibs?
>
>
> > Interesting question...
> > basically I agree with you... Cocoon is *just* a framework, so its task
is
> > to give you one (or more) way to do things.
> > It oblige you and force to use a strong structure (sitemap, Generators,
> > transformers)...
> >
> > Everything you do with cocoon can be done by servlets...
> > but remember that even servlets are a "evolution" of old cgi-bins
written
> in
> > perl/C...
> >
> > There are a lots of reasons that can make you prefer XML to HTML, Java
to
> > C... Cocoon to self-made-stuff!
> > I think the most important are always the same: speed of development,
> > separation of logic from content, a STANDARD way..... an many more
> reasons.
> >
> > Anyway, I hope Cocoon become soon a more widely supported standard. I
> belive
> > that soon there will be a lot of new configuration tools and a better
> > documentation.
> >
> > - Tomás.
> >
> > ----- Original Message -----
> > From: "Heath Stewart" <hs...@esotericrealm.com>
> > To: <co...@xml.apache.org>
> > Sent: Tuesday, November 27, 2001 6:05 PM
> > Subject: Cocoon or Tomcat with Servlets/Taglibs?
> >
> >
> > I'm trying to decide whether or not to use Cocoon or just Tomcat (via
> > mod_webapp with Apache/SSL) with Servlets, JSP, and Taglibs. What does
> this
> > list think? I've done stuff with Cocoon, but frankly, it's more
> complicated
> > to map servlets and tag libs which I would use extensively in my site,
not
> > to mention it's easy to build an entire site based on Tomcat with Forte
> for
> > Java, since it's all built in. I can also create taglibs and have an
<xml>
> > tag or something that I would then use Xerces and Xalan to transform the
> > source XML and XSL files, maybe even the FOP library for some kind of
> print
> > servlet. Isn't that basically what Cocoon is doing with the sitemap,
just
> > mapping requests for files (like **.html to **.xml) to a Java class(es)
> > using Xerces and Xalan to transform the source?
> >
> > Heath Stewart
> > Network Administrator / Web Developer
> > College of Veterinary Medicine
> > Iowa State University
> > http://www.vetmed.iastate.edu
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Cocoon or Tomcat with Servlets/Taglibs?

Posted by David Rosenstrauch <da...@dti.net>.
Some comments ...


At 11:35 AM 11/27/01 -0600, you wrote:
>I'm just trying to figure out if I should take the time and create a
>huge sitemap with all the functionality I want


I can understand that.  You want to make sure there's enough of a benefit before you put in the work.


>I've also looked into
>how to use servlets with Cocoon and it isn't pretty


Doesn't have to be, right?  You can just have your sitemap redirect to a servlet, or have a form generated by a servlet submit to cocoon.  Should be able to move between servlets and cocoon quickly and easily, no?

Other thoughts on this:

* If you're talking about calling servlet code from Cocoon, then you might want to consider pulling the code out of the servlet into some common class that can be called both from Cocoon (from an XSP page, for example) as well as from the servlet.

* You might want to consider looking into Cocoon Action classes.  They're probably much easier to integrate with a Cocoon app than a servlet.


>not to mention
>everytime I need to add some basic functionality, I need to restart cocoon,
>then httpd after tomcat restarts.


Actually, you don't need to.

* XSP pages and your sitemap get automatically re-compiled when changed, without restarting Cocoon/Tomcat.  Similarly, changes to XML and XSL files are picked up automatically without a re-start.

* Although code (e.g., Action classes) are not picked up automatically, you don't have to shut down Tomcat to reload them.  Assuming that you have set up manager access, you can use the manager servlet to reload Cocoon without a shutdown (e.g., http://localhost/manager/reload?path=/cocoon)



>I
>could implement my navbars using taglibs instead of XInclude, which would be
>easier anyway


Again, your call.  You'll have to decide if the benefit vs. cost of Cocoon is sufficient for you to go with it.


HTH.

DR



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Cocoon or Tomcat with Servlets/Taglibs?

Posted by Heath Stewart <hs...@esotericrealm.com>.
Oh, I agree that XML is great. I've been following it for years and already
employ *heavy* XML usage on the ISU College of Veterinary Medicine site I
designed and implemented, only it uses ASP and ASP.NET. I could never
afford - nor would I want - an IIS server, so I have Apache/Tomcat to work
with. I'm just trying to figure out if I should take the time and create a
huge sitemap with all the functionality I want rooted at a different
directory so that I can still have my Netscape Roaming profiles app setup,
all my users home directories that are probably just plain HTML files, and
all my SSL-enabled sites, as well as my WebCVS. Once I use WebAppDeploy with
cocoon as "/", everything else on the site is screwed. I currently have it
mounted at /c2 , but I'd rather it just work as "/". I've also looked into
how to use servlets with Cocoon and it isn't pretty, not to mention
everytime I need to add some basic functionality, I need to restart cocoon,
then httpd after tomcat restarts. This is annoying, especially for a
personal site that is always in development using new technology and
techniques. For this reason, I'd almost prefer just a plain Java server. I
could implement my navbars using taglibs instead of XInclude, which would be
easier anyway, sort of like how ASP.NET has the <asp:xml> tag to transform
source according to your will.

Heath Stewart
Network Administrator / Web Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu
----- Original Message -----
From: "Tomas Espeleta" <to...@digival.es>
To: <co...@xml.apache.org>
Sent: Tuesday, November 27, 2001 11:26 AM
Subject: Re: Cocoon or Tomcat with Servlets/Taglibs?


> Interesting question...
> basically I agree with you... Cocoon is *just* a framework, so its task is
> to give you one (or more) way to do things.
> It oblige you and force to use a strong structure (sitemap, Generators,
> transformers)...
>
> Everything you do with cocoon can be done by servlets...
> but remember that even servlets are a "evolution" of old cgi-bins written
in
> perl/C...
>
> There are a lots of reasons that can make you prefer XML to HTML, Java to
> C... Cocoon to self-made-stuff!
> I think the most important are always the same: speed of development,
> separation of logic from content, a STANDARD way..... an many more
reasons.
>
> Anyway, I hope Cocoon become soon a more widely supported standard. I
belive
> that soon there will be a lot of new configuration tools and a better
> documentation.
>
> - Tomás.
>
> ----- Original Message -----
> From: "Heath Stewart" <hs...@esotericrealm.com>
> To: <co...@xml.apache.org>
> Sent: Tuesday, November 27, 2001 6:05 PM
> Subject: Cocoon or Tomcat with Servlets/Taglibs?
>
>
> I'm trying to decide whether or not to use Cocoon or just Tomcat (via
> mod_webapp with Apache/SSL) with Servlets, JSP, and Taglibs. What does
this
> list think? I've done stuff with Cocoon, but frankly, it's more
complicated
> to map servlets and tag libs which I would use extensively in my site, not
> to mention it's easy to build an entire site based on Tomcat with Forte
for
> Java, since it's all built in. I can also create taglibs and have an <xml>
> tag or something that I would then use Xerces and Xalan to transform the
> source XML and XSL files, maybe even the FOP library for some kind of
print
> servlet. Isn't that basically what Cocoon is doing with the sitemap, just
> mapping requests for files (like **.html to **.xml) to a Java class(es)
> using Xerces and Xalan to transform the source?
>
> Heath Stewart
> Network Administrator / Web Developer
> College of Veterinary Medicine
> Iowa State University
> http://www.vetmed.iastate.edu
>
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Cocoon or Tomcat with Servlets/Taglibs?

Posted by Tomas Espeleta <to...@digival.es>.
Interesting question...
basically I agree with you... Cocoon is *just* a framework, so its task is
to give you one (or more) way to do things.
It oblige you and force to use a strong structure (sitemap, Generators,
transformers)...

Everything you do with cocoon can be done by servlets...
but remember that even servlets are a "evolution" of old cgi-bins written in
perl/C...

There are a lots of reasons that can make you prefer XML to HTML, Java to
C... Cocoon to self-made-stuff!
I think the most important are always the same: speed of development,
separation of logic from content, a STANDARD way..... an many more reasons.

Anyway, I hope Cocoon become soon a more widely supported standard. I belive
that soon there will be a lot of new configuration tools and a better
documentation.

- Tomás.

----- Original Message -----
From: "Heath Stewart" <hs...@esotericrealm.com>
To: <co...@xml.apache.org>
Sent: Tuesday, November 27, 2001 6:05 PM
Subject: Cocoon or Tomcat with Servlets/Taglibs?


I'm trying to decide whether or not to use Cocoon or just Tomcat (via
mod_webapp with Apache/SSL) with Servlets, JSP, and Taglibs. What does this
list think? I've done stuff with Cocoon, but frankly, it's more complicated
to map servlets and tag libs which I would use extensively in my site, not
to mention it's easy to build an entire site based on Tomcat with Forte for
Java, since it's all built in. I can also create taglibs and have an <xml>
tag or something that I would then use Xerces and Xalan to transform the
source XML and XSL files, maybe even the FOP library for some kind of print
servlet. Isn't that basically what Cocoon is doing with the sitemap, just
mapping requests for files (like **.html to **.xml) to a Java class(es)
using Xerces and Xalan to transform the source?

Heath Stewart
Network Administrator / Web Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>