Re: how to access parameter inside of action
Nils Leßmann wrote: Hi! This one can?t be too tough ? anyway I?m not able to find an example somewhere. I?m writing my own action and need to pass a parameter, with something like How can I access this value inside the action? The cocoon docs just mention that this work, but not how. This should work: In sitemap: map:act type=your-action map:parameter name=fileid value=smoevalue / /map:act In your action: public class YourAction extends AbstractAction implements ThreadSafe { public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters params) { String fileid = params.getParameter(fileid); } Regards, Nils Nils Leßmann Stockacher Str. 38 68239 Mannheim 0175 - 814 899 8 -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
File downloading with cocoon
Hi, I am having some trouble with the following. I want users to be able to download some zip (or any type) files. So, I have put in the sitemap the following: map:match pattern=course-material/**.zip map:act type=action-retrieve-lecture-notes map:read type=resource src=LectureNotes/{../1}.zip mime-type=application/zip / /map:act map:redirect-to uri=../lecture-notes / /map:match The action simply checks if the user is allowed to access the zip files. And if not, the user is being redirected to a login page (../lecture-notes). This login form makes use of the same action (action-retrieve-lecture-notes), which also ensures that the user is pointed to the appropriate file that is to be downloaded (and this depends on some login information, including a course id). All this works quite nicely, except that the map:read does not really start up a download process. That is, it causes all the steps necessarily and the user is being asked what to do with the file (save it, open it, etc) like any other download process, but the file that is being downloaded has a file size of zero. But the file that is accessed locally is the correct one: I have checked the cocoon log files. There is no problem with the file itself (I have placed it into a publically accessible location served directly by the Apache webserver and had no problems with downloading the file.) So what to do? I was thinking that it is maybe some caching issue. Some of the files to be downloaded can be fairly large (there is one file of about 20 Mb). I am using cocoon-2.0.4, java 1.4.0_01 and Tomcat 4.0.4. Thanks for any help. -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
Re: Would cocoon be a good choice ?
[EMAIL PROTECTED] wrote: Hello ! I am wondering if cocoon would help in doing the following. The users need to download zipped pdf and txt files filled with data comming from a DB2 db. The data uploaded depend on the user's login and can range from 100 to 1 000 000 records. platform AIX Websphere 4.0.3 (IBM jdk 1.3) DB2 7.2 I would be gratefull for any opinion. I think it would be very useful. As a matter of fact, I am currently looking at similar things. I use cocoon, among other things, for user authentication and pointing users to a protected directory where these (g)zipped files are located. Obviously, these could be generated from data taken from various databases (as you do). The only trouble I have is the download process itself that is to be initiated by cocoon. Maybe you have solved that. Alexis Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 /mn) ; tél : 08 92 68 13 50 (0,34/mn) - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
Re: File downloading with cocoon
Geoff Howard wrote: Have you tried setting the expires parameter of the map:reader definition to some reasonable value? I have recently noticed some similar but not identical behavior trying to download using the resource reader with no expires value. Yes, I had that already. This is what I currently have in the sitemap: map:readers default=resource map:reader src=org.apache.cocoon.reading.ResourceReader logger=sitemap.reader.resource pool-max=32 pool-min=1 pool-grow=4 !-- optional reader configuration -- map:parameter name=expires value=8640/ /map:reader /map:readers The expires value would correspond to 1 day. What happens is that a 20 Mb file gives me trouble. The file is being downloaded up to about 78% of its size. And that's it. The process simply stops. Thanks for your help, Andre. Geoff Howard -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 4:20 AM To: cocoon-users Subject: File downloading with cocoon Hi, I am having some trouble with the following. I want users to be able to download some zip (or any type) files. So, I have put in the sitemap the following: map:match pattern=course-material/**.zip map:act type=action-retrieve-lecture-notes map:read type=resource src=LectureNotes/{../1}.zip mime-type=application/zip / /map:act map:redirect-to uri=../lecture-notes / /map:match The action simply checks if the user is allowed to access the zip files. And if not, the user is being redirected to a login page (../lecture-notes). This login form makes use of the same action (action-retrieve-lecture-notes), which also ensures that the user is pointed to the appropriate file that is to be downloaded (and this depends on some login information, including a course id). All this works quite nicely, except that the map:read does not really start up a download process. That is, it causes all the steps necessarily and the user is being asked what to do with the file (save it, open it, etc) like any other download process, but the file that is being downloaded has a file size of zero. But the file that is accessed locally is the correct one: I have checked the cocoon log files. There is no problem with the file itself (I have placed it into a publically accessible location served directly by the Apache webserver and had no problems with downloading the file.) So what to do? I was thinking that it is maybe some caching issue. Some of the files to be downloaded can be fairly large (there is one file of about 20 Mb). I am using cocoon-2.0.4, java 1.4.0_01 and Tomcat 4.0.4. Thanks for any help. -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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] - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
Re: File downloading with cocoon
Litrik De Roy wrote: From: Andre Juffer [EMAIL PROTECTED] Geoff Howard wrote: ah, that's a different ballgame - can you confirm that things work well with smaller files? Yes, I can. Just tried a 5 Mb zip file. No problem at all. The contents of that file was correct and corresponded to the original file in the protected directory. I guess it must be a setting somewhere in cocoon (or in Tomcat maybe) that possibly limits the file size. Maybe cache size? We have people downloading 50 MB files from our Cocoon site (using the ByteRangeResourceReader in 2.1 scratchpad). OK. I guess I need to update to Cocoon 2.1. Thanks, Andre. They work just fine. Litrik De Roy www.litrik.com - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
File dowloading
Hi, I am having some trouble with the following. I want users to be able to download some zip (or any type) files. So, I have put in the sitemap the following: map:match pattern=course-material/**.zip map:act type=action-retrieve-lecture-notes map:read type=resource src=LectureNotes/{../1}.zip mime-type=application/zip / /map:act map:redirect-to uri=../lecture-notes / /map:match The action simply checks if the user is allowed to access the zip files. And if not, the user is being redirected to a login page (../lecture-notes). The login form makes use of the same action (action-retrieve-lecture-notes); this action ensures also that the user is pointed to the appropriate file that is to be downloaded (and this depends on some login information, including some course id). All this works quite nicely, except that the map:read does not really start up a download process. That is, it causes all the steps necessarily and the user is being asked what to do with the file (save it, open it, etc) like any other download process, but the file that is being downloaded has a file size of zero. But the file that is accessed locally is the correct one: I have checked the cocoon log files. There is no problem with the file itself (I have placed it into a publically accessible location served directly by the Apache webserver and had no problems with downloading the file.) So what to do? I was thinking that it is maybe some caching issue. Some of the files to be downloaded can be fairly large (there is one file of about 20 Mb). I am using cocoon-2.0.2-dev, java k1.4.0_01 and Tomcat 4.0.4. Thanks for any help. -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
Re: File Upload using action or any other approach
Olivier Rossel wrote: Hello? Has anyone accomplished to upload files from html forms to the server to a specific directory .. Yes, I did, with an action. What is the problem? Can you please explain how you did that? Or may be provide us the code, if it is not copyrighted? Well, the code is protected, so I cannot give you that. But it can be accomplished very simply in your action. We did things in a SAX way: 1. Get the file name that is stored in one of parameters of the your Request object, originally set by the HTML form on the client. It should point to a local file on the server into which the content of uploaded file is now stored. With Cocoon it will point to a location under tomcat/work. At least, in our case it does. 2. Define a Reader that reads from that file. 3. Define a Parser with a ContentHandler in the same way as you would do for a SAX parser, but, of course, your Parser doesn't have to be a XML parser. The ContentHandler could simply write everything it receives into a local file at your choice. In this way, one can store the uploaded non-XML file into a local XML file, but with the possibility to use filters, as in SAX. 4. Start parsing: parse(reader). This is just one very simple possibility. If your uploaded file is already well-formed XML, you could use for instance Xindice to store it immediately into a XML database without modification. If you don't need filtering and checking the content of your file, step 2 to 4 can be done much simpler, but I found that solution for our purposes more flexible, since we dealing with non-XML input files. We will combine things with Xindice. I am sure, others have better solutions. Hopes this helps, Andre. - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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: File Upload using action or any other approach
Chitharanjan Das wrote: Hello? Has anyone accomplished to upload files from html forms to the server to a specific directory .. Yes, I did, with an action. What is the problem? -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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: Apache, Tomcat 4, Cocoon, mod_webapp, and mod_rewrite -- how to get it working?
Liam Morley wrote: I'm looking for somebody who is using the above pieces. Or really just anybody who is using mod_rewrite. My mod_rewrite is set up as follows: RewriteEngine On RewriteLog E:/apache/Apache/logs/rewrite.log RewriteLogLevel 3 RewriteRule ^/(.*) /cocoon/cms/$1 [PT] You are running on Windows, right? Maybe, you should use E:\apache\Apache\logs\rewrite.log instead ('\' instead of '/'). In my case (on a Linux machine), the [PT} did noy work for me. Instead, I have [R] and that worked correctly with Tomcat 4.0.1 and Cocoon2.0rc2. These lines are directly after the AddModule section. I want my Cocoon application to seem like it's at the root directory. I'm hoping that's what's getting accomplished here. I have mod_webapp set up as follows: WebAppConnection conn warp imotic.res.wpi.net:8008 WebAppDeploy cocoon conn /cocoon Did you also include something like (on Linux): LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c This is at the bottom of my httpd.conf file. I'm getting a 404 when I try accessing the root directory. I checked my Apache error.log file and saw the following: [Thu Nov 29 03:55:21 2001] [error] [client 130.215.226.58] File does not exist: e:/apache/apache/htdocs/cocoon/cms/ Why would it be looking in the htdocs folder?? Shouldn't it know from webapp that anything in /cocoon is handled by tomcat? I tried setting webapp to be deployed in the root directory, and changed the rewrite rool from /cocoon/cms/$1 to /cms/$1. Upon loading the page, the cocoon website came up; /cocoon instead of /cocoon/cms. This leads me to believe that webapp is getting processed before rewrite. This is the opposite order in which I want them to be processed. How do I make sure that rewrite is processed first? A huge thank you to anybody who can help out. Liam Morley - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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: installation cocoon
Wim Peeters wrote: Hello, Can someone help me with the installation of cocoon. If there a document or is someon willing to describe the steps to make tomcat work with cocoon. I have the following versions installed on my machine: apache http server 1.3.22 tomcat 4.0.1 cocoon 1.8 This is what I have added to the conf.httpd file to get Cocoon 2 working on Linux Slackware with Apache and Tomcat 4 (Catalina): LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy cocoonconn /cocoon WebAppInfo /webapp-info It worked immediately after restarting Tomcat4 and Apache. I have not tried this with Cocoon1.8, but I guess it will work as well. The mod-webapp.so module can be obtained from CVS (jakarta-tomcat-connectors/webapp). Hope this helps, Andre. thanks a lot Wim Peeters __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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: mod_rewrite
Liam Morley wrote: Can anybody who has successfully used mod_rewrite for Cocoon2 please contact me, or send me your full configuration (apache, tomcat if used, cocoon)? if you're using mod_jk, that'd be yet another plus. Or if not full configuration, as much as you can spare... Here's what's happening to me: I'm checking the rewrite log, and it seems to be working correctly- it will say that the user is being redirected to the proper page. However, this never happens when I'm actually using the browser, though. Let's say / is redirecting to /cocoon/my_proj/ (I'll leave the actual regexp stuff out for purposes of brevity). If I type in http://localhost/;, I get a 404 (yet the rewrite.log says that I've been redirected to /cocoon/myproj). if I type out http://localhost/cocoon/myproj/;, then I actually see what I want to see - however, rewrite.log says I'm being redirected to http://localhost/cocoon/myproj/cocoon/myproj, so I'm not sure what's going on. Any assistance would be greatly appreciated. Hi Liam, this is what I have in my httpd.conf. I have an application called Biocomputing so that a request like localhost/Biocomputing/something is redirected to localhost /cocoon/Biocomputing/something. Especially the line JkMount /cocoon/* ajp12 appears to be crucial. Without it, nothing is working, although the rewrite rule itself was properly executed (according to the log file). include /usr/local/jakarta-tomcat/conf/mod_jk.conf-auto JkMount /*.jsp ajp12 JkMount /*.xml ajp12 JkMount /cocoon/* ajp12 RewriteEngine On RewriteLog /var/log/rewrite.log RewriteLogLevel 3 RewriteRule ^/Biocomputing(.*) /cocoon/Biocomputing$1 [R] I hope this will help you, Andre. --- Liam Morley light the deep, and bring silence to the world. light the world, and bring depth to the silence. - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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]
C2: About taglibs
Dear All, I have a practical question. I have this taglib that I have written earlier for C1. With C1, one could tell cocoon where to find the corresponding xsl file through an entry in cocoon.properties. What is the best way of doing this with C2. The cocoon.xconf file contains entries like builtin-logicsheet parameter name=prefix value=session/ parameter name=uri value=http://apache.org/xsp/session/2.0/ parameter name=href value=resource://org/apache/cocoon/components/language/markup/xsp/java/session.xsl/ /builtin-logicsheet If I want to use my own taglibs, should I also make a similar entry in cocoon.xconf, so that my taglib would be identified as a builtin-logicsheet as well. Or are there other procedures that one should follow to ensure that C2 recognizes my taglib. For instance, is it possible to have a cocoon.xconf in a separate directory where my own application lives (e.g. /cocoon/MyApplication) that is specific for that application? One would do this also with the sitemap.xmap. This would be a convenient way since then one could easily install a newer version of cocoon2 and only have to tell it where to look for MyApplication by a simple entry in the new sitemap in /cocoon. There is no need then to update the new cocoon.xconf as well (although, I admit, it is not really much work to do so). Thanks for your help, -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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]
[C2] Pipeing non-XML thrue Cocoon
What do you mean by Write a custom Reader class that retrieves that PDF and puts it down the stream. ?! The org.apache.cocoon.reading.Reader interface is a combination of a Generator and a Serializer. Look at the classes in there for samples. Giacomo If I understood things correctly from the javadocs, a MyReader could take input (Source) from a local file on the server or from some URL. How about the situation when a user has to submit the contents of a non-XML document through a form (e.g. by coping the file content into an textarea) that is to be handled by an Action. I could get an String attribute containing that non-XML document from the Request, parse the String, convert it to XML and send that down the pipeline (the latter step is not entirely clear to me: should I put the freshly generated XML in Session, so I should write to some OutputStream). Is there another way, possibly more in coherence with the way how things are done in Cocoon2? (It is somewhat difficult to look through all these classes and to find out what they do and how one should use them.) Thanks for your help, -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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: C1 to C2, FAQ
Hi Davanum, the original problem was how to get apache working together with tomcat and Cocccn2. There is actually a FAQ Why does nothing happen when I access 'http://localhost/cocoon/'? Some possibilities are listed there. in addition to these, in the case of mod_jk, it is crucial to include the directive JkMount /cocoon/* ajp12 along with other directives that are already listed in mod_jk.conf-auto in the tomcat/conf directory. One could add the above directive at the end of httpd.conf. The second problem I was looking into was the following. How can I use the request http://your.server.org/Foo/welcome (as an example), where Foo is an application that depends on Cocoon2, instead of employing something like http://your.server.org/cocoon/Foo/welcome. So, it would not be required to always include cocoon in the request. Mainly based upon Luca Morandini's suggestions, I could get things to work with the following two modifications: 1. Add to httpd.cond: RewriteEngine On RewriteLog /var/log/rewrite.log RewriteLogLevel 0 RewriteRule ^/Foo /cocoon/Foo/ [R] RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R] The file rewrite.log does not have to be located in /var/log. For instance, under Windows NT other locations may be appropriate. The RewriteLogLevel should be set 3 for debug purposes. The third line is essentially a redirect, so that Foo become /cocoon/Foo/ with the trailing /, without it the request would not map onto map:match pattern= map:redirect-to uri=welcome / /map:match if I request http://your.server.org/Foo. Finally, the last RewriteRule could depend on the local settings. The original suggestion by Luca was a single line entry (that replaces both RewriteRules above) according to RewriteRule Foo/(.*) /cocoon/Foo/$1 [PT] but this did not work in my case (Slackware Linux with Apache1.3, tomcat3.2.2, Cocoon2). Again, these RewriteRules may vary somewhat depending on the local settings. You may have to experiment somewhat 2. Add to the sitemap.xmap in the cocoon directory: map:pipeline map:match pattern=Foo/** map:mount uri-prefix=Fru src=/www/Foo/ check-reload=yes reload-method=synchron/ /map:match /map:pipeline Here, /www/Foo is a some directory on the local file system where the xml, xsp, .., files of the application Foo live. As Luca pointed out, the src attribute may have to include file:// I hope that the information above is useful for others as well. With thanks to Luca, Lajos, Anders, and others. Cheers, Andre. Davanum Srinivas wrote: Andre, Can you re-post the complete instructions in the form of a FAQ? I will check it in. Thanks, dims --- Andre Juffer [EMAIL PROTECTED] wrote: Hi All, I got it finally working. The directive JkMount /cocoon/* ajp12 did it. I apparently kept on missing that part, since this was not required for tomcat-apache-cocoon1, where always, it seems, .xml was employed to redirect xml request to cocoon1. I would support the suggestion of Luca to put these few things into the FAQ, because I would assume that more people make the same mistake as I did. Thank you for your help, Andre. Luca Morandini wrote: Andre, this is snippet from my mod_jk.conf (get rid of mod_jk.conf-auto, or it will be overwritten every time you start Tomcat): IfModule mod_jk.c JkWorkersFile C:/Apps/Tomcat/conf/workers.properties JkLogFile C:/Apps/Tomcat/logs/mod_jk.log JkLogLevel warn JkMount /*.jsp ajp12 JkMount /*.xml ajp12 JkMount /cocoon/* ajp12 /IfModule I presume this will do the trick of redirecting. Moreover, somewhere down mod_jk.conf, there is this cocoon-related stuff: # # The following line makes apache aware of the location of the /cocoon context # Alias /cocoon C:/Apps/Tomcat/webapps/cocoon Directory C:/Apps/Tomcat/webapps/cocoon Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /cocoon/servlet/* ajp12 JkMount /cocoon/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/Apps/Tomcat/webapps/cocoon/WEB-INF/ AllowOverride None deny from all /Directory # # The following line prohibits users from directly accessing META-INF # Location /cocoon/META-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/Apps/Tomcat/webapps/cocoon/META-INF/ AllowOverride None deny from all /Directory - Please check that your question has not already been answered in the FAQ before
Re: C1 to C2
Hi All, I got it finally working. The directive JkMount /cocoon/* ajp12 did it. I apparently kept on missing that part, since this was not required for tomcat-apache-cocoon1, where always, it seems, .xml was employed to redirect xml request to cocoon1. I would support the suggestion of Luca to put these few things into the FAQ, because I would assume that more people make the same mistake as I did. Thank you for your help, Andre. Luca Morandini wrote: Andre, this is snippet from my mod_jk.conf (get rid of mod_jk.conf-auto, or it will be overwritten every time you start Tomcat): IfModule mod_jk.c JkWorkersFile C:/Apps/Tomcat/conf/workers.properties JkLogFile C:/Apps/Tomcat/logs/mod_jk.log JkLogLevel warn JkMount /*.jsp ajp12 JkMount /*.xml ajp12 JkMount /cocoon/* ajp12 /IfModule I presume this will do the trick of redirecting. Moreover, somewhere down mod_jk.conf, there is this cocoon-related stuff: # # The following line makes apache aware of the location of the /cocoon context # Alias /cocoon C:/Apps/Tomcat/webapps/cocoon Directory C:/Apps/Tomcat/webapps/cocoon Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /cocoon/servlet/* ajp12 JkMount /cocoon/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/Apps/Tomcat/webapps/cocoon/WEB-INF/ AllowOverride None deny from all /Directory # # The following line prohibits users from directly accessing META-INF # Location /cocoon/META-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/Apps/Tomcat/webapps/cocoon/META-INF/ AllowOverride None deny from all /Directory By the way, I'm not using Linux, but Windows NT 4.0 (as you may guess from the paths...). Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: martedì 17 luglio 2001 23.13 To: [EMAIL PROTECTED] Subject: Re: C1 to C2 Luca Morandini wrote: Andre, I used mod_jk instead of jserv, hence, I can't be of much assistance. I would suggest you to switch to mod_jk, which is (reportedly) better, then we may work out the problem... Hi Luca, All right, I switched to mod_jk. No change, however, everything I had with jserv also applies to jk. The directory /cocoon is displayed if I do the request localhost/cocoon in the same way as /localhost/examples would do. Is this in fact to be expected, since localhost:8080/cocoon results in the welcome page, so the latter request compiles the sitemap. If I do localhost:8080/examples I also get a listing of the directory examples, but now tomcat handled the request. Again, localhost:8080/cocoon works entirely correct. Maybe you could show me your server.xml and mod-jk.conf-auto files to see what you have in your case. Are you accidentally using a linux (Slackware) based system? Cheers, Andre Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: lunedì 16 luglio 2001 23.38 To: [EMAIL PROTECTED] Subject: C1 to C2 Luca, Anders, Lajos, I keep on having the same problem. While localhost:8080/cocoon correctly displays the welcome page of cocoon2, it seems to be impossible for me to get apache + tomcat 3.2.2 + cocoon2 working together, such also the request localhost/cocoon displays the welcome page. The following is what being including into httpd.conf (in addition to what is already given in tomcat-3.2.2/conf/tomcat-apache.conf): AddType text/xml .xml AddHandler jserv-servlet .xml Alias /cocoon /usr/local/jakarta-tomcat-3.2.2/webapps/cocoon Directory /usr/local/jakarta-tomcat-3.2.2/webapps/cocoon Options Indexes FollowSymLinks /Directory ApJServMount /cocoon/servlet /cocoon Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location Location /cocoon/META-INF/ AllowOverride None deny from all /Location RewriteEngine
Re: C1 to C2
Davanum Srinivas wrote: Andre, Can you re-post the complete instructions in the form of a FAQ? I will check it in. Yes, I'll see to it and send something in within the next day or so. Cheers, Andre Thanks, dims --- Andre Juffer [EMAIL PROTECTED] wrote: Hi All, I got it finally working. The directive JkMount /cocoon/* ajp12 did it. I apparently kept on missing that part, since this was not required for tomcat-apache-cocoon1, where always, it seems, .xml was employed to redirect xml request to cocoon1. I would support the suggestion of Luca to put these few things into the FAQ, because I would assume that more people make the same mistake as I did. Thank you for your help, Andre. Luca Morandini wrote: Andre, this is snippet from my mod_jk.conf (get rid of mod_jk.conf-auto, or it will be overwritten every time you start Tomcat): IfModule mod_jk.c JkWorkersFile C:/Apps/Tomcat/conf/workers.properties JkLogFile C:/Apps/Tomcat/logs/mod_jk.log JkLogLevel warn JkMount /*.jsp ajp12 JkMount /*.xml ajp12 JkMount /cocoon/* ajp12 /IfModule I presume this will do the trick of redirecting. Moreover, somewhere down mod_jk.conf, there is this cocoon-related stuff: # # The following line makes apache aware of the location of the /cocoon context # Alias /cocoon C:/Apps/Tomcat/webapps/cocoon Directory C:/Apps/Tomcat/webapps/cocoon Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /cocoon/servlet/* ajp12 JkMount /cocoon/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/Apps/Tomcat/webapps/cocoon/WEB-INF/ AllowOverride None deny from all /Directory # # The following line prohibits users from directly accessing META-INF # Location /cocoon/META-INF/ AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/Apps/Tomcat/webapps/cocoon/META-INF/ AllowOverride None deny from all /Directory By the way, I'm not using Linux, but Windows NT 4.0 (as you may guess from the paths...). Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: martedì 17 luglio 2001 23.13 To: [EMAIL PROTECTED] Subject: Re: C1 to C2 Luca Morandini wrote: Andre, I used mod_jk instead of jserv, hence, I can't be of much assistance. I would suggest you to switch to mod_jk, which is (reportedly) better, then we may work out the problem... Hi Luca, All right, I switched to mod_jk. No change, however, everything I had with jserv also applies to jk. The directory /cocoon is displayed if I do the request localhost/cocoon in the same way as /localhost/examples would do. Is this in fact to be expected, since localhost:8080/cocoon results in the welcome page, so the latter request compiles the sitemap. If I do localhost:8080/examples I also get a listing of the directory examples, but now tomcat handled the request. Again, localhost:8080/cocoon works entirely correct. Maybe you could show me your server.xml and mod-jk.conf-auto files to see what you have in your case. Are you accidentally using a linux (Slackware) based system? Cheers, Andre Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: lunedì 16 luglio 2001 23.38 To: [EMAIL PROTECTED] Subject: C1 to C2 Luca, Anders, Lajos, I keep on having the same problem. While localhost:8080/cocoon correctly displays the welcome page of cocoon2, it seems to be impossible for me to get apache + tomcat 3.2.2 + cocoon2 working together, such also the request localhost/cocoon displays the welcome page. The following is what being including into httpd.conf (in addition to what is already given in tomcat-3.2.2/conf/tomcat-apache.conf): AddType text/xml .xml AddHandler jserv-servlet .xml Alias /cocoon /usr/local/jakarta-tomcat-3.2.2/webapps/cocoon Directory /usr/local/jakarta-tomcat
Re: C1 to C2
Luca Morandini wrote: Andre, I used mod_jk instead of jserv, hence, I can't be of much assistance. I would suggest you to switch to mod_jk, which is (reportedly) better, then we may work out the problem... Hi Luca, All right, I switched to mod_jk. No change, however, everything I had with jserv also applies to jk. The directory /cocoon is displayed if I do the request localhost/cocoon in the same way as /localhost/examples would do. Is this in fact to be expected, since localhost:8080/cocoon results in the welcome page, so the latter request compiles the sitemap. If I do localhost:8080/examples I also get a listing of the directory examples, but now tomcat handled the request. Again, localhost:8080/cocoon works entirely correct. Maybe you could show me your server.xml and mod-jk.conf-auto files to see what you have in your case. Are you accidentally using a linux (Slackware) based system? Cheers, Andre Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: lunedì 16 luglio 2001 23.38 To: [EMAIL PROTECTED] Subject: C1 to C2 Luca, Anders, Lajos, I keep on having the same problem. While localhost:8080/cocoon correctly displays the welcome page of cocoon2, it seems to be impossible for me to get apache + tomcat 3.2.2 + cocoon2 working together, such also the request localhost/cocoon displays the welcome page. The following is what being including into httpd.conf (in addition to what is already given in tomcat-3.2.2/conf/tomcat-apache.conf): AddType text/xml .xml AddHandler jserv-servlet .xml Alias /cocoon /usr/local/jakarta-tomcat-3.2.2/webapps/cocoon Directory /usr/local/jakarta-tomcat-3.2.2/webapps/cocoon Options Indexes FollowSymLinks /Directory ApJServMount /cocoon/servlet /cocoon Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location Location /cocoon/META-INF/ AllowOverride None deny from all /Location RewriteEngine On RewriteLog /var/log/rewrite.log RewriteLogLevel 3 RewriteRule Biocomputing/(.*) /cocoon/Biocomputing/$1 [PT] The rewriting is actually working in the way it should (Thanks Luca). Also, localhost/cocoon in fact displays the CONTENT of the webapps/cocoon directory and the same for localhost/Biocomputing/ (with the trailing /), which gives me correctly the /cocoon/Biocomputing directory. The key problem are these lines (I think) AddType text/xml .xml AddHandler jserv-servlet .xml In fact, if I request localhost/cocoon/welcome.xml, the cocoon2 servlet is responding (in the way it should): --- Cocoon 2 - Resource not found type resource-not-found message Resource not found description The requested URI /cocoon/welcome.xml was not found. sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri /cocoon/welcome.xml path-info welcome.xml --- The sitemap is not compiled, though. If I add to the sitemap the following --- map:match pattern=welcome.xml map:redirect-to uri=welcome/ /map:match --- localhost/cocoon/welcome.xml will not display the welcome. It is shown, of course, upon the request localhost:8080/cocoon/welcome.xml. In fact, the request localhost/cocoon/welcome results in Not Found The requested URL /cocoon/welcome was not found on this server. Apache/1.3.12 Server at ajuffer-dsl.oulu.fi Port 80 - So, in the latter case, Apache is handling the request instead of cocoon2. Obviously, this is because there is no .xml extension. If you are using Tomcat 3.2.2, Apache 1.3.* and cocoon2, what exactly have you for AddType and AddHandler directives in your configuration? Of course, I can always write all my files ending with e.g. xml, xsp and adapt the sitemap accordingly (and use 8080). No objections there, but it is ugly. Currently, I think, requests like your-server/Foo/foo without having some extension at the foo, cannot be resolved correctly in a simple way such that cocoon2 takes over the request. Or do I still miss something totally . what, on earth? Cheers, Andre. -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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
Re: [C2] serving via Apache
Mike, I am currently experiencing exactly the same problem. I can only reach cocoon2 via port 8080, while /examples etc. are properly served via Apache. I am running on a Linux box (Slackware 7.1). Just wondering, what is your system: Win NT, Linux, ..? I have installed mod_jk, but it did no remove the problem in my case. Mike Haarman wrote: I am running Apache 1.3.#, Tomcat 3.2.1, Cocoon-2.0b1 I am having touble getting C2 to serve via Apache. I have followed several threads on the topic in the archives, but they appear to refer to C1. I am using mod_jk and had it configured correctly for C1 to serve on port 80. Currently I can only get C2 to serve from port 8080. Does mod_jk.conf require modification to allow Apache to serve C2? What am I missing? - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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: C1 to C2
Anders Lindh wrote: Be aware that C2 will serve _all_ the pages (including the static ones). If you are in an Apache+Tomcat+Cocoon context, this mean that Everything on your site will be served by C2. If you use apache you tell it what requests to pass to Tomcat (with mod_jk or mod_jserv). You can e.g tell it to pass requests for all .xml files in /cocoon to Tomcat (and cocoon if configured properly). This way all static content can be served by apache (x100 faster) and all dynamic pages by tomcat/cocoon. Yes, this is correct. This is the way I have done in the past (apache-tomcat-cocoon1). But is this going to work only if one uses the extension .xml., since Cocoon2 also uses patterns in its sitemap (e.g. welcome instead of welcome.xml)? For tomcat-apache-cocoon1, the following is what I have in httpd.conf: LoadModule jserv_module libexec/mod_jserv.so ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel notice ApJServDefaultHost localhost ApJServDefaultPort 8007 ApJServMount default /root AddType test/jsp .jsp AddHandler jserv-servlet .jsp AddType text/xml .xml AddHandler jserv-servlet .xml Alias /cocoon /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon Directory /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon Options Indexes FollowSymLinks /Directory ApJServMount /cocoon /cocoon AddType text/xml .xml AddHandler jserv-servlet .xml Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/Foo Directory /usr/local/jakarta-tomcat-3.2.1/webapps/Foo Options Indexes FollowSymLinks /Directory ApJServMount /Foo/servlet /Foo Location /Foo/WEB-INF/ AllowOverride None deny from all /Location The server.xml in tomcat/conf in fact includes an entry for cocoon1 as follows: !-- Start Cocoon Section -- servlet servlet-nameorg.apache.cocoon.Cocoon/servlet-name servlet-classorg.apache.cocoon.Cocoon/servlet-class init-param param-nameproperties/param-name param-value cocoon.properties /param-value /init-param /servlet servlet-mapping servlet-nameorg.apache.cocoon.Cocoon/servlet-name url-pattern*.xml/url-pattern /servlet-mapping !-- End Cocoon Section -- Everything that has the extension .xml including those in /Foo automatically is forwarded to cocoon1 and therefore served by cocoon1, while the static files are served by the Apache webserver. This all works very nicely. It must be possible to do the same thing with cocoon2 somehow, but it seems to me that these patterns could cause some problems. Andre. - Anders - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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: C1 to C2
Hi Luca, thank you for your response. Let me see if I understand you correctly. The GENERAL sitemap is the sitemap located in the cocoon subdirectory (webapps/cocoon), or are you referring to another sitemap? The idea of a sub-sitemap below is clear to me. Still, the request localhost/Foo/foo goes through the Apache webserver, which passes it on to Tomcat. But Tomcat will try to read webapps/Foo and not webapps/cocoon, because the configuration of Tomcat was set up like that. Should I possibly include in the configuration file of tomcat something like --- Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon --- so that /Foo would correspond to /cocoon as well? In combination with the sub-sitemap as you suggested, the correct pipeline would start. Is the above correct? Thanks you again, Andre. Luca Morandini wrote: Andre, have you modifed the general sitemap to tell Cocoon you're not under the cocoon context ? For instance, when I wanted a sub-sitemap of mine to be relocated to the c:\cru directory, I modified the general sitemap as follows: map:pipeline map:match pattern=cru/** map:mount uri-prefix=cru src=file:///c:/cru/ check-reload=yes reload-method=synchron/ /map:match /map:pipeline I hope this helps... - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: mercoledì 11 luglio 2001 21.19 To: [EMAIL PROTECTED] Subject: C1 to C2 Hi, just recently I have posted a question about having cocoon2 recognizing my own context under tomcat/webapp. This may be a tomcat problem, still I had cocoon1.8.2, together with the apache web server and tomcat, working just fine with my own context. Obviously, I would like to be able to do the same with cocoon2, but I could not get it going. I have removed everything that had something to do with cocoon1 and got cocoon2 installed. No problem, I could read cocoon/welcome and try some of the examples. I did not make any modifications in the existing configuration files. So, I continued and made a very simple sitemap in webapps/cocoon that simply transforms foo.xml into some html. Worked without problem in webapps/cocoon, but, after transferring the relevant files to webapps/Foo and restarting tomcat and apache, I got error messages. If I request localhost/Foo, the content of my context is displayed, but it fails to start the pipeline associated with the transformation (localhost/Foo/foo). I get the following error: type resource-not-found message Resource not found description The requested URI /Foo/foo was not found. sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri /Foo/foo path-info foo foo is the pattern that should start the pipeline. This works perfectly all right when carried out in the cocoon context (http://localhost/cocoon/foo). So, it must be a context setup problem. It seems that tomcat properly sees my context: 2001-07-11 07:50:34 - ContextManager: Adding context Ctx( /Foo ) Is there anything special that I may need to do so that tomcat/apache/cocoon2 work nicely together? This is the content of a configuation file that is included into the apache httpd.conf file (the same I have used before with cocoon1): LoadModule jserv_module libexec/mod_jserv.so ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel notice ApJServDefaultHost localhost ApJServDefaultPort 8007 AddType test/jsp .jsp AddHandler jserv-servlet .jsp AddType text/xml .xml AddHandler jserv-servlet .xml Alias /cocoon /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon Directory /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon Options Indexes FollowSymLinks /Directory ApJServMount /cocoon /cocoon Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/Foo Directory /usr/local/jakarta-tomcat-3.2.1/webapps/Foo Options Indexes FollowSymLinks /Directory ApJServMount /Foo /Foo Location /Foo/WEB-INF/ AllowOverride None deny from all /Location Thank you for any suggestion you may have to resolve this matter, -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL
Re: C1 to C2
Luca Morandini wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andre Juffer Sent: giovedì 12 luglio 2001 15.11 To: [EMAIL PROTECTED] Subject: Re: C1 to C2 Luca Morandini wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andre Juffer Sent: giovedì 12 luglio 2001 13.35 To: [EMAIL PROTECTED] Subject: Re: C1 to C2 Hmmm... why you would like to start a different context ? I assumed you wanted just to put you application in a directory other than \webapps\cocoon... am I wrong ? You are entirely correct. That is exactly what I have in mind. I should say that all static html (normally in public_html in user's subdirectories, as is common under Unix) are still served directly by the Apache webserver. Nothing of that is going through cocoon. Under cocoon1, one uses tomcat where files with the extension .xml where served by tomcat and ultimately by cocoon1. I was under the impression that things with cocoon2 were done in a similar way, but maybe everything should be served by cocoon2 first (including these html files) and the sitemap would than start the appropriate pipelines? (That would explain the word sitemap). So, cocoon2 would control the complete website (both static and dynamic files). Is the Apache webserver in fact still required to run on the server? No, you could dispense with Apache and run everything on Tomcat, though it seems an overkill to me (and less stable, too). Talking about C2, there is no need to start another Cocoon context, far from it... you should just tell Cocoon to find your files where they are. The mechanism to do that is to modify the sitemap (the one I've named general sitemap in my previous message) in order to mount the sub-sitemap correctly. The odd thihg about this is that you may find your site only by referring to an URI with cocoon in it, like ...\cocoon\cru\index.xml. Next step is to tell Apache to redirect everything from cru to coocon\cru (provided, of course, cru is the name of you application); I've used the rewrite engine of Apache, adding the following to httpd.conf: RewriteEngine On RewriteLog C:/apps/apache/logs/rewrite.log RewriteLogLevel 0 RewriteRule cru/(.*) /cocoon/cru/$1 [PT] It works, but it took me half a day to figure it out the whole process :( So, apparently it is not possible to have something like mydomain.com/Foo/foo, and one must always use something like mydomain.com/cocoon/Foo/foo, if I understood you correctly. That is too bad, since it was certainly possible with cocoon1. There must (should) be a way around it. Andre Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] +39 0744 59 85 1 Office +39 0335 681 02 12 Mobile http://utenti.tripod.it/lmorandini/index.html - - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/research.html - 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]
C1 to C2
Hi, just recently I have posted a question about having cocoon2 recognizing my own context under tomcat/webapp. This may be a tomcat problem, still I had cocoon1.8.2, together with the apache web server and tomcat, working just fine with my own context. Obviously, I would like to be able to do the same with cocoon2, but I could not get it going. I have removed everything that had something to do with cocoon1 and got cocoon2 installed. No problem, I could read cocoon/welcome and try some of the examples. I did not make any modifications in the existing configuration files. So, I continued and made a very simple sitemap in webapps/cocoon that simply transforms foo.xml into some html. Worked without problem in webapps/cocoon, but, after transferring the relevant files to webapps/Foo and restarting tomcat and apache, I got error messages. If I request localhost/Foo, the content of my context is displayed, but it fails to start the pipeline associated with the transformation (localhost/Foo/foo). I get the following error: type resource-not-found message Resource not found description The requested URI /Foo/foo was not found. sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri /Foo/foo path-info foo foo is the pattern that should start the pipeline. This works perfectly all right when carried out in the cocoon context (http://localhost/cocoon/foo). So, it must be a context setup problem. It seems that tomcat properly sees my context: 2001-07-11 07:50:34 - ContextManager: Adding context Ctx( /Foo ) Is there anything special that I may need to do so that tomcat/apache/cocoon2 work nicely together? This is the content of a configuation file that is included into the apache httpd.conf file (the same I have used before with cocoon1): LoadModule jserv_module libexec/mod_jserv.so ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel notice ApJServDefaultHost localhost ApJServDefaultPort 8007 AddType test/jsp .jsp AddHandler jserv-servlet .jsp AddType text/xml .xml AddHandler jserv-servlet .xml Alias /cocoon /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon Directory /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon Options Indexes FollowSymLinks /Directory ApJServMount /cocoon /cocoon Location /cocoon/WEB-INF/ AllowOverride None deny from all /Location Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/Foo Directory /usr/local/jakarta-tomcat-3.2.1/webapps/Foo Options Indexes FollowSymLinks /Directory ApJServMount /Foo /Foo Location /Foo/WEB-INF/ AllowOverride None deny from all /Location Thank you for any suggestion you may have to resolve this matter, -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/tutkimus/Biocomputing/ - 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]