By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,537 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,537 IT Pros & Developers. It's quick & easy.

Calling Cocoon in Servlet/JSP

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.