cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo F. Ochoa" <>
Subject RE: Dynamic XML generation
Date Tue, 18 Jul 2000 23:13:35 GMT


I'm a Cocoon beginner and I'm sure you have read this question before,
but I haven't been able to find a consistent answer in all the mailing
list archives I've searched, so please help me out.

I have a servlet that checks access authorization by username and
password, send a database request and outputs the result in HTML.
Authorization and database access are handled by separate classes, so
the servlet itself is quite lightweight.

Now I would like to 'Cocoon-enable' this application. My first try was
to convert the servlet into a producer. This works fine, but there
remain a few problems. For example, the authorization should not be part
of the production process: In the original servlet I redirected the user
to the login page on authentication fail. Now the producer (resp.
authenticator) has to come up with some mockup XHTML code that
reproduces the login page. So I am looking for an approach that handles
authentication separately and then has Cocoon do its work.

My next consideration was having the servlet handle the authorization
and then explicitly call the Cocoon engine. But this use has been
strictly discouraged in all the postings I've seen, since Cocoon
shouldn't be used as an API (sounds sensible to me).

I think I'm still missing some insight into the overall Cocoon
architecture. Could someone point me to a more in-depth description of
its design, or (maybe even better) to some sample code handling dynamic
XML generation and tasks other than pure content generation that is a
bit less trivial than DummyProducer et al?
[Marcelo F. Ochoa]  You could see the DB Prism code and internals documentation in order to
see another producer that generate dynamic XML in DB Side. Also you could see the code of
HeaderProcessor class that manage Http redirection when the user donĀ“t pass the authentication

Thank you very much in advance,
[Marcelo F. Ochoa]  Regards, Marcelo.

PD: Db prism is at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message