Calling Cocoon in Servlet/JSP

Discussion in 'XML' started by Jawahar, Sep 23, 2003.

  1. Jawahar

    Jawahar Guest

    Hi All..
    Currently in our application, we are using Serlvet as Controller,Jsp
    to View,BusinessLogic in EJB. We planned to implement Cocoon frame
    work in our existing application.

    Is this Possible..?

    I already worked on sample xml,xslt,but i need an example where
    servlet or JSP would call Cocoon application to display it in the
    browser.

    If so tell me where i can get a sample code.

    Thanks in Advance

    Jawahar
    Jawahar, Sep 23, 2003
    #1
    1. Advertising

  2. Jawahar

    Simon Mieth Guest

    On Tue, 23 Sep 2003 03:14:59 -0700, Jawahar wrote:

    > Hi All..
    > Currently in our application, we are using Serlvet as Controller,Jsp
    > to View,BusinessLogic in EJB. We planned to implement Cocoon frame
    > work in our existing application.
    >
    > Is this Possible..?


    Yes

    >
    > I already worked on sample xml,xslt,but i need an example where
    > servlet or JSP would call Cocoon application to display it in the
    > browser.
    >
    > If so tell me where i can get a sample code.
    >
    > Thanks in Advance
    >
    > Jawahar


    You can build a pipeline in cocoon, where cocoon fetch the content from
    your JSP and transform with your stylesheets and send the output to the
    browser.

    simple pipeline in your sitemap.xmap (inside <map:pipelines>)

    <map:pipeline>
    <map:match pattern="newJSPView.html">
    <!-- cocoon calls your JSP -->
    <map:generate src="http://localhost/yourOld.jsp"/>
    <map:transform src="yourStylesheet.xsl"/>
    <map:serialize type="html"/>
    </map:match>
    </map:pipeline>

    If cocoon is running a servlet and your JSP and servlet too, you can test
    with your browser http://localhost:8080/cocoon/newJSPView.html.

    You can find many examples and hints on the cocoon-homepage
    http://cocoon.apache.org/2.1/ or on the cocoon-wiki
    http://wiki.cocoondev.org/ .

    You can also look on the mailing-list-archives.

    hope that helps,

    Simon
    Simon Mieth, Sep 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. circuit_breaker
    Replies:
    2
    Views:
    1,975
    Jack Jia
    Apr 4, 2004
  2. Thomas S.
    Replies:
    0
    Views:
    577
    Thomas S.
    Nov 12, 2004
  3. Replies:
    0
    Views:
    665
  4. Replies:
    0
    Views:
    397
  5. javadev
    Replies:
    5
    Views:
    12,849
    javadev
    Nov 16, 2006
Loading...

Share This Page