I've written a simple servlet, but when it run return this Error: Failed to execute pipeline.:java.io.IOException

What is the problem?

SERVLET

public class HelloXML extends HttpServlet {

  public void doGet(HttpServletRequest request,HttpServletResponse response)
        throws IOException, ServletException
    {
       try{
          response.setContentType("text/xml");

          PrintWriter out = response.getWriter();
          out.print("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
          out.print("<page>");
          out.print("<title>This is the pageOne.xml example</title>");
          out.print("<s1 title=\"Section one\">");
          out.print("<p>This is the text of section one</p>");
          out.print("</s1>");
          out.print("</page>");
          out.flush();
          out.close();

  }
  catch (Exception e) {
        System.err.println(e.toString()+"  "+e.getMessage());
   }

    }
}

 

SITEMAP:

<?xml version="1.0" encoding="iso-8859-1"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

    <map:pipelines>
        <map:pipeline>
    <map:match pattern="HelloWorld">            
     <map:generate src=""http://localhost:8888/cocoon/internal/Hello">http://localhost:8888/cocoon/internal/Hello" />
           <map:transform src="" />
             
                <map:serialize type="html"/>
               
          </map:match>

        </map:pipeline>
    </map:pipelines>
</map:sitemap>

DOC2HTML.XSL

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/">
  <html>
    <head>
      <title><xsl:apply-templates select="page/title"/></title>
    </head>
    <body>
     <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="s1">
    <h1><xsl:apply-templates select="@title"/></h1>
    <xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>

thanks to all.



Ricerche online pi� semplici e veloci con MSN Toolbar ! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to