Calling Cocoon in Servlet/JSP

J

Jawahar

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
 
S

Simon Mieth

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top