Peter Hunsberger skrev:
On 7/17/07, Daniel Fagerstrom <[EMAIL PROTECTED]> wrote:
<snip/>
I will start from the WebFlow tutorial and give an outline on what needs
to be modified:
* The root application context (services-config.xml) needs to be
extended with the Cocoon components. See
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/applicationContext.xml
for what is needed. This in turn will load all bean configs frm the
Cocoon blocks.
* If you want to use Cocoon in the "classic" style the
o.a.c.servlet.SitemapServlet needs to be configured in the web.xml. If
you want to use the servlet service style the
o.a.c.servletservice.DispatcherServlet needs to be configured
(http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/web.xml).
Can you explain why someone would prefer one approach over the other?
If you build a small webapp consisting of just one sitemap and don't use
any servlet services from other blocks, you save a couple of lines of
configurations (and the need to learn about servlet service fw), by
using the "classical" style. If you upgrade a 2.1 webapp to 2.2 it might
also be reasonable to go this way as a first step.
But as soon as you want to modularize your webapp and reuse other blocks
with servlet services, the servlet service style, is the way to go. Also
as we are converting our blocks, like e.g. the forms blocks, to make
their resources available through servlet services, the servlet service
style is becoming the preferable style.
/Daniel