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());

 }
==================

}
============



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to