Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Calling Cocoon in Servlet/JSP

Reply
Thread Tools

Calling Cocoon in Servlet/JSP

 
 
Jawahar
Guest
Posts: n/a
 
      09-23-2003
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
 
Reply With Quote
 
 
 
 
Simon Mieth
Guest
Posts: n/a
 
      09-23-2003
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 <mapipelines>)

<mapipeline>
<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>
</mapipeline>

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sceeen generator from xml file? (like cocoon?) Elhanan ASP .Net 0 08-15-2005 08:50 AM
Tomcat+Struts+Cocoon: Good tutorials needed about Cocoon integration Thomas S. Java 0 11-12-2004 08:42 AM
Cocoon authentication Adam Java 0 06-13-2004 09:09 AM
Cocoon XML to XML Cram TeXeD Java 0 12-19-2003 02:31 PM
Cocoon 2.1.0 with JBoss 3.2.1 freezez under heavy load Blazej Zak Java 2 11-19-2003 09:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57