cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Borer <jean-marc.bo...@infodesign.com>
Subject Re: Help:Cocoon and servlet
Date Tue, 24 Jul 2001 07:46:21 GMT
I want to do exactly the same thing as you. If anyone could help us or
provide us advice I would really appreciate.

Cheers,

Jean-Marc Borer

Mamadou Bobo Sylla wrote:
> 
> Hello everyone,
> I am trying to test some the code examples from Apache . When I call the xml
> page countries.xml through bowser, it works fine being processd by page.xsl.
> But I want countries.xml to be processed after a resquet to a servlet.
> For that purpose I have writtent a servlet called Test which should now
> output the xml  to be processed by a stylsheet called page.xsl.
> 
> How do I configure  Cocoon so that it becomes aware of my servlet.
> 
> The codes of Test.java:
> ============
> public class Test extends HttpServlet {
> 
>  public void doGet( HttpServletRequest req,
>                        HttpServletResponse res )
>         throws ServletException, IOException
>  {
> 
>   PrintWriter output = res.getWriter();
>         res.setContentType( "text/xml" );
> 
>          StringBuffer xmlbuf =new StringBuffer("<?xml version=\"1.0\"
> encoding = \"UTF-8\"?>");
>   xmlbuf.append("<?cocoon-process type=\"xslt\"?>");
>   xmlbuf.append("<?xml-stylesheet href=\"page.xsl\" type=\"text/xsl\"?>");
>   xmlbuf.append("<page>");
>   xmlbuf.append("<country code = \"ca\">Canada</country>");
>   xmlbuf.append( "<country code = \"de\">Germany</country>");
>   xmlbuf.append("<country code = \"fr\">France</country>") ;
>   xmlbuf.append("<country code = \"uk\">United Kingdom</country>");
>   xmlbuf.append("<country code = \"us\">United States</country>");
>   xmlbuf.append("<country code = \"es\">Spain</country>");
>   xmlbuf.append("</page>");
> 
>   output.println(xmlbuf.toString());
> 
>  }
> ==================
> 
> }
> ============
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


Mamadou Bobo Sylla wrote:
> 
> Hello everyone,
> I am trying to test some the code examples from Apache . When I call the xml
> page countries.xml through bowser, it works fine being processd by page.xsl.
> But I want countries.xml to be processed after a resquet to a servlet.
> For that purpose I have writtent a servlet called Test which should now
> output the xml  to be processed by a stylsheet called page.xsl.
> 
> How do I configure  Cocoon so that it becomes aware of my servlet.
> 
> The codes of Test.java:
> ============
> public class Test extends HttpServlet {
> 
>  public void doGet( HttpServletRequest req,
>                        HttpServletResponse res )
>         throws ServletException, IOException
>  {
> 
>   PrintWriter output = res.getWriter();
>         res.setContentType( "text/xml" );
> 
>          StringBuffer xmlbuf =new StringBuffer("<?xml version=\"1.0\"
> encoding = \"UTF-8\"?>");
>   xmlbuf.append("<?cocoon-process type=\"xslt\"?>");
>   xmlbuf.append("<?xml-stylesheet href=\"page.xsl\" type=\"text/xsl\"?>");
>   xmlbuf.append("<page>");
>   xmlbuf.append("<country code = \"ca\">Canada</country>");
>   xmlbuf.append( "<country code = \"de\">Germany</country>");
>   xmlbuf.append("<country code = \"fr\">France</country>") ;
>   xmlbuf.append("<country code = \"uk\">United Kingdom</country>");
>   xmlbuf.append("<country code = \"us\">United States</country>");
>   xmlbuf.append("<country code = \"es\">Spain</country>");
>   xmlbuf.append("</page>");
> 
>   output.println(xmlbuf.toString());
> 
>  }
> ==================
> 
> }
> ============
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message