Max Pfingsthorn wrote:
Hi everyone,

I've been looking at trunk to find out how things work these days and
it looks great, but I am a bit confused. It seems like the blocks can
register their own servlet to handle requests, is that true?

yes There is
a suspicious xml file in META-INF/cocoon/spring in each sample. But
how does spring, or is it avalon, know that this servlet should be
used at all? Through DispatcherServlet?

The DispatcherServlets scans the Spring application context for all beans that are of type "Servlet" and looks for a proropety "path". If both conditions are fulfilled, the servlet is registered.

It doesn't seem to work right
now though, at least not if I use the cocoon-webapp.

IIRC the Cocoon webapp hasn't been moved to use the servlet-service framework completly.

Is there an easy
way to make it work? I'm trying to do some json stuff, so a "detour"
through cocoon would not be so great.

Do you want to provide your own servlet service that doesn't use Cocoon sitemaps? Have a look at the servlet-service-sample module which already contains a sample that uses a "non-sitemap" servlet.

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------

                
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Reply via email to