cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.org>
Subject Re: Servlet generating an XML--->How to write the pipeline?
Date Sun, 04 Aug 2002 02:29:57 GMT


Skip Carter wrote:

>>I have a servlet which generates an xml file which in
>>turn should be transformed using xslt.How do I write
>>the pipeline for the same?
>>
>>Say the name of the servlet is check.class(where
>>should I place the class, in web-inf?), the name of
>>the xml file generated by the pipeline is test.xml and
>>the stylesheet used is test.xsl.How should my pipeline
>>look like?
>>
>
>  I handle this with any entry like the following in the main pipeline in 
>sitemap.xmap:
>
>
>      <!-- chain a servlet from tomcat -->
>      <!-- note: using the request action only works for GET not for POST -->
>       <map:match pattern="Servlet/*">
>           <map:act type="request">
>               <map:parameter name="parameters" value="true"/>
>               <map:generate src="http://myserver.com:8080{requestURI}{requestQ
>uery}" />
>               <map:transform src="stylesheets/servlets.xsl" />
>           </map:act>
>           <map:serialize type="html"/>
>      </map:match>
>
>
>  (If somebody has a good solution for POST I'd be interested in seeing it)
>

Please see the thread

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102728683118655&w=2

Hope that helps

Michael





>
>
>  My servlets are handled directly by tomcat (which is listening on port 
>8080), that way I can easily control
>  access to the "raw" servlet.  But you can have cocoon handle the servlet 
>instead by making the proper
>  entries in the cocoon WEB-INF/web.xml file, for example:
>
>   <!-- after the normal cocoon <servlet> entry -->
>   <servlet>
>      <servlet-name>check</servlet-name>
>      <servlet-class>check</servlet-class>
>   </servlet>
>
>  <!-- before the normal cocoon <servlet-mapping> entry -->
>  <servlet-mapping>
>    <servlet-name>check</servlet-name>
>    <url-pattern>/check</url-pattern>            
>  </servlet-mapping>
>	
>
>	Your classes can go in WEB-INF/classes
>
>
>
>
>
>Skip
>
>
>



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

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message