> 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) 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 -- Dr. Everett (Skip) Carter Phone: 831-641-0645 FAX: 831-641-0647 Taygeta Scientific Inc. INTERNET: [EMAIL PROTECTED] 1340 Munras Ave., Suite 314 WWW: http://www.taygeta.com Monterey, CA. 93940 --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>