I need the output in the cocoon pipelines. I am already using the jspReader 
but it gives me errors.  Below is the sitemap that I am using to generate jsp 
pages. Is JSPReader another option of JTidy/JSPGenerator. 

Thanks,
Anna


<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

  <!-- =========================== Components ================================ 
-->
  <map:components>
    <map:generators default="file">
      <!-- JspGenerator is used to get result of a JSP page 
           then output it as XML (SAX events)
      -->
      <map:generator logger="sitemap.generator.jsp" name="jsp"
                     src="org.apache.cocoon.generation.JspGenerator"/>
    </map:generators>
    <map:transformers default="xslt"/>
    <map:readers default="resource">
      <!-- JSPReader is used to serve direct output from 
           a JSP page. Note, that JSP result can be non XML  -->
      <map:reader logger="sitemap.reader.jsp" name="jsp" 
                  src="org.apache.cocoon.reading.JSPReader"/>
    </map:readers>
    <map:serializers default="html"/>
    <map:matchers default="wildcard"/>
    <map:selectors default="browser"/>
  </map:components>

  <!-- =========================== Pipelines ================================= 
-->
  <map:pipelines>
    <map:pipeline>
      <!-- This works only if TreeProcessor is used -->
      <map:match pattern="">
        <map:redirect-to uri="welcome.htm" />
      </map:match>

      <map:match pattern="*.htm">
        <map:read type="jsp" src="{1}.jsp" mime-type="text/html" />
      </map:match>

      <!-- Use this to debug your JSPs -->
      <map:match pattern="*.xml">
        <map:generate type="jsp" src="{1}.jsp"/>
        <map:serialize type="xml"/>
      </map:match>

      <map:match pattern="*.jsp">
        <map:generate type="jsp" src="{1}.jsp"/>
        <map:serialize type="html"/>
      </map:match>
      
          <!--+
    | Mount everything else by calling the sitemap.xmap file located
    | in the requested folder.
    +-->
    <map:match pattern="*/**">
      <map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/>
    </map:match>

    </map:pipeline>
  </map:pipelines>
</map:sitemap>
<!-- end of file -->


On Monday 02 February 2004 05:46 pm, Joerg Heinicke wrote:
> On 02.02.2004 23:24, Anna Bikkina wrote:
> > Looks like my jsp pages are not well formatted xml docs. They are more
> > html stuff with jsp tags. Can anyone help me use the same jsps without
> > rewriting the existing ones. Rewriting them would be a lot of work and we
> > do not have so much time to complete the project.
>
> Do you need the output of the JSP in the Cocoon pipelines? If not you
> can use JSPReader. Otherwise you need to extend the JSPGenerator with
> the JTidy functionality as in HTMLGenerator.
>
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to