> From: Paul Mchugh [mailto:[EMAIL PROTECTED]] > > Hi All, > > I'm a new-comer to Cocoon and would like to find out if it is possible to use > its services from within an existing tomcat webapp, rather than deploying the > cocoon servlet in its own webapp. > > My own webapp has some servlets and java beans that are hooked up to a > database. > > I would like to define a Cocoon pipeline that uses an XSP to access data > stored in the ApplicationContext and SessionContext of my own tomcat webapp. > > From this I'd like the pipeline to transform the data from the XSP into an > intermediate XML format and then into several different formats: HTML, PDF, > RTF, Text etc. > > I would then like to call these pipelines from within my own servlets and re- > direct the output to a printer rather than back to the browser. > > Is this possible? > > From the Java APIs it looks like it is possible by creating a different type > of environment to an HTTPEnvironment: i.e. a FileSavingEnvironment and > initiate the pipeline programatically. Am I on the right track here and if so > ... what API calls are used to invoke the pipeline?
You can do this. See Main.java and CocoonServlet.java for samples on how to instantiate and access Cocoon. > Any information gratefully received. There were some discussions on dev list on how one can easily do tasks like this (send output to file, printer, etc), but there is no final decision yet. Vadim > Thanks > > Paul --------------------------------------------------------------------- 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]>