cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Combining Cocoon with Struts Tag libs
Date Tue, 05 Feb 2002 14:08:54 GMT


The situation is this:

1) I need to accomplish a validation of a 5 part form that is validated and
filled incrementally.
2) Take the contents of this composite form and create one xml from it's
3) Submit to a Transforming servlet that takes this xml and spits back an
xml response after retrieving info from a Mainframe app.
4a) Display xml response as a page with 6 tabs ( one page w/ layers or six
pages with links to the others)
4b) If there are errors in the response for any of the six parts it needs
to display the form with the corresponding inputs filled in for corrections
to be made.
5) Accept re-submission and re-validate
6) Submit reponse to back-end again, loop sequence.

This sequence is the bulk of the app.  There is security and other stuff,
but that is the core of it.

The debate is over performance, use of languages, and ease of support.
With performance coming at the top of that list.

One other concern I have about splitting the architecture into two servlets
is session management.  Where do I put the timeout logic is another
question I need to answer?

The developers not surprisingly are skeptic of anything that involves xml
based coding, instead of what they are comfortable with(Model 2).

I need to come up with a good reason not to use Struts.


                      Werner Guttmann                                                    
                      <Werner.Guttmann@morgans        To:,
ldexp-dev <>,    
            >                     cc:                             
                                                      Subject:  Re: Combining Cocoon with
Struts Tag libs                                     
                      06/17/02 10:53 AM                                                  
                      Please respond to                                                  


there's a couple of alternatives you seem to have, one of them using
et alias to implement functionality of Struts in Cocoon. As this
has only become available in the recent past, we have taken a different
approach using the XMLizable interface of Cocoon to integrate our business
domain model with both Struts and Coccon.

In our case, an inbound HTTP request is

1) picked up by Struts, which a) populates its FormBean(s) , and b)
to a pre-configured Action for additional validation. If successful, we
forward control to an XSP ... in order to avoid introducing dependencies
between Struts and Cocoon, we decided to implement our own set of JavaBeans
keep the set of parameters as selected in the HTML form, which we attached
the request/session scope as attributes.

b) On Coccon receiving the HTTP request (forward), Coocon kicked in and
invoked the relevant pipeline. That pipeline uses the ServerPages generator
invoke an XSP that uses the following code fragment:

   XMLizable xmlizable = new XTransformer();


Cocoon - when processing the <xsp:exp> element - will invoke the
toSAX(ContentHandler) method on our XTransformer class, and expects this
method to insert SAX events into the event stream. In our case, for each
business entity we have a corresponding Transformer instance that uses the
aforementioned Criteria object, a business delegate and (potentially) a
list handler implementation to get a collection of business entities from
business backend, and render them to SAX events. From there on, it's
as usual with Cocoon executing the remainder of the pipeline.

Now, having followed some of the traffic on this list re: XMLForms, etc., I
under the impression that most of the stuff could (and maybe should) be
through the use of XMLForms, ValidatorAction, etc. Unfortunately, I have
had the time to evaluate the various offering (yet).

I hope this helps.
Werner wrote:

> Cocoon-Collective,
> I am still trying to make architecture decisions.  I have a pretty good
> understanding of both Struts and Cocoon architectures.  I have seen a
> couple of other people inquire about a hybrid solution using the
> in both.  Has anyone considered or done this successfully and seemingly
> painlessly?
> I guess this really comes down to a comparison of xsp vs. jsp and which
> use.  The other major consideration is performance, the system I need to
> build will be high traffic and transactional.  Does anyone have a similar
> situation or opinion that will help my decision process?
> Thanks,
> Adam
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <>
> To unsubscribe, e-mail:     <>
> For additional commands, e-mail:   <>

Please check that your question  has not already been answered in the
FAQ before posting.     <>

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

Please check that your question  has not already been answered in the
FAQ before posting.     <>

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

View raw message