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

ipelines>)
<map

ipeline>
<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

ipeline>
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