Re: Re: Antwort: RE: Calling C2 from command line: problem with Oracle driver
Hello list, Why would you want to run Cocoon without Tomcat? What can Cocoon do without a servlet engine? It is possible because Cocoon2 is made on an abstraction that can make it interface with different containers. Currently there are two abstactions (Environment) available: command line and servlet. So yes, it can function on itself, no, it can't respond to http requests by itself for now. Command line executes all the things in the sitemap and generates the resulting files on the filesystem. Once again, to make it clear, what I want to achieve... I have built a web application, which presents the informations concerning a life insurance contract on our intranet. The web page is called like //http:server/cocoon/Contract.xsp?contract_id=1234567 For looking at single contracts everything is fine. But now I want to generate all these info sheets for many hundreds of contracts and send the results to an other department, which has no possibility to access our intranet. Therefor I want to call Cocoon with a todo list, which could look like this: Contract.xsp?contract_id=1112234 Contract.xsp?contract_id=1112236 Contract.xsp?contract_id=1112237 Contract.xsp?contract_id=1112324 Contract.xsp?contract_id=1123534 Contract.xsp?contract_id=1467301 Contract.xsp?contract_id=1668709 ... Now Cocoon has to generate the html files for each uri and save it somewhere. My intermediate results are: 1) Cocoon can be called from the command line by using the run.sh script in the Cocoon root directory. 2) It is possible to configure the Cocoon call with parameters. Execute sh run.sh -h for a list of Parms and options. 3) I have configured the run time environment in a way, that the command line version takes the same sitemap files and web application files as the servlet version called by tomcat. And now there is only one question left: How can I tell the command line environment to load and initialize the classes needed for the Oracle database access? In the servlet version this is done be specifying an init-param in the web.xml file with the param-name load-class. And here I'm stuck! I think, the implementation of the class org.apache.cocoon.Main needs some extension, to give a possibility to the user to achieve the same things, as init-param in web.xml does in the servlet case. Thanks Christoph - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Antwort: RE: Calling C2 from command line: problem with Oracle driver
Hi, Have you looked at the way that Cocoon generates it's own documentation from a commandline invocation? This may be what you are looking for in terms of generating off-line content. Hope this helps Adrian - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 06, 2001 10:31 AM Subject: Re: Re: Antwort: RE: Calling C2 from command line: problem with Oracle driver Hello list, Why would you want to run Cocoon without Tomcat? What can Cocoon do without a servlet engine? It is possible because Cocoon2 is made on an abstraction that can make it interface with different containers. Currently there are two abstactions (Environment) available: command line and servlet. So yes, it can function on itself, no, it can't respond to http requests by itself for now. Command line executes all the things in the sitemap and generates the resulting files on the filesystem. Once again, to make it clear, what I want to achieve... I have built a web application, which presents the informations concerning a life insurance contract on our intranet. The web page is called like file://http:server/cocoon/Contract.xsp?contract_id=1234567 For looking at single contracts everything is fine. But now I want to generate all these info sheets for many hundreds of contracts and send the results to an other department, which has no possibility to access our intranet. Therefor I want to call Cocoon with a todo list, which could look like this: Contract.xsp?contract_id=1112234 Contract.xsp?contract_id=1112236 Contract.xsp?contract_id=1112237 Contract.xsp?contract_id=1112324 Contract.xsp?contract_id=1123534 Contract.xsp?contract_id=1467301 Contract.xsp?contract_id=1668709 ... Now Cocoon has to generate the html files for each uri and save it somewhere. My intermediate results are: 1) Cocoon can be called from the command line by using the run.sh script in the Cocoon root directory. 2) It is possible to configure the Cocoon call with parameters. Execute sh run.sh -h for a list of Parms and options. 3) I have configured the run time environment in a way, that the command line version takes the same sitemap files and web application files as the servlet version called by tomcat. And now there is only one question left: How can I tell the command line environment to load and initialize the classes needed for the Oracle database access? In the servlet version this is done be specifying an init-param in the web.xml file with the param-name load-class. And here I'm stuck! I think, the implementation of the class org.apache.cocoon.Main needs some extension, to give a possibility to the user to achieve the same things, as init-param in web.xml does in the servlet case. Thanks Christoph - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: RE: Calling C2 from command line: problem with Oracle driver
Hi all, thank you Aaron, for the desription how to use Oracle from within Cocoon (and Tomcat!). This also works in my environment. My question is: I want to call Cocoon2 from then command line WITHOUT Tomcat. There is a run.sh file in the Cocoon root directory, which starts Cocoon with a stand alone java-cmd. No Tomcat! In this case, Cocoon makes some assumptions, e.g. where the applications are (./webapp), where the work-dir is, etc. I wonder, where I can set these parameters. Also I wonder, where the settings can be done, which are normally set in the web.xml file of Tomcat, like the init-param named load-class (because there is no Tomcat in command line operation). web-app servlet servlet-nameCocoon2/servlet-name init-param param-nameload-class/param-name param-value oracle.jdbc.driver.OracleDriver /param-value /init-param ... /servlet /web-app So, in other words, my problem is: how can I set up an environment for starting Cocoon stand alone which is compatable to my Tomcat environment. Did anybody run Cocoon2 from the command line already Any reports are appreciated! The background for my request is the following: I have written an application sampling together data concerning a life insurance contract from several SQL-databases with the esql-taglib in a xsp:page, which is then transformed to html. Now I want to run this application for many cases and send the final html-pages to an other department. Thank you Christoph - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]