Re: where to get cocoon 3.0.0-beta-1-SNAPSHOT
Hi! You can get the source code from http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/. Cheers, Jos On Mon, Feb 8, 2016 at 10:26 AM, Hans-Heinrich Braun < hansheinrichbr...@yahoo.de> wrote: > I used cocoon 3.0.0-beta-1-SNAPSHOT for a Rest email distribution > application starting with the emailpipeline Thorsten made for me. > I want to change to a new system renewing all my java applications and saw > i deleted the source 3.0.0-beta-1-SNAPSHOT and i cannot find in internet. > Can you help me? > > > -- > *Von:* gelo1234> *An:* Cocoon Users > *Gesendet:* 11:31 Donnerstag, 7.Januar 2016 > *Betreff:* Re: Help needed moving from 2.1.11 > > Hi, > > There is no need to configure it in any special way. All defaults are out > of the box and are mostly sane (what every developer needs). > C3 is considered to be more a RESTful framework not only a simple XML > distribution system. > Most sitemap.xmaps work ok. > > We have taken some steps into moving our app from 2.0.5dev to 3.0 and with > some tweaking it worked fine! Check out the latest C3 snapshots from > repository. > There are sample artifacts for many-blocks and only one block > configuration (simple web app). > > Greetings, > Greg > > > 2016-01-07 10:18 GMT+01:00 Flynn, Peter : > > On 06/01/16 17:49, Mark H. Wood wrote: > > When I first looked at Cocoon 3, I thought it was more like a return > > to Cocoon's roots, clearing away a lot of stuff that had accumulated > > and concentrating on the pipeline. > > I should have another look > > > It's quite true that, without intense study of what documentation > > there is, it is very difficult to find any mention of how to configure > > it with XML, but the XML configurator is still in there. > > Configuring it with XML would be useful (eg sitemap.xmap) but what I > meant was that Cocoon primary task was (is?) to serve XML documents via > XSLT as {text|xml|html|...} > > > ///Peter > > - > To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org > For additional commands, e-mail: users-h...@cocoon.apache.org > > > > > -- Confucius said way too much ...
Re: cocoon-2.1.12 - lucene indexer - cinclude
Hi Peter, What file do you want to include? (I see no src attribute?) Cheers, Jos On Mon, Mar 16, 2015 at 8:37 PM, Peter Sparkes pe...@didm.co.uk wrote: Hi, I have a lucene application base on samples/blocks/querybean All worked fine for a long time, but now the cinclude in !-- the lucene indexer -- map:match pattern=screen/indexer map:generate type=jx src=screens/lucene-indexer.xml/ map:transform type=cinclude/ for new file result in for example: lucene:document url=2947 /lucene:document instead of for the older files lucene:document url=4696 lodge lodge=west farm web=true etc /lodge /lucene:document Please,Any ideas why the cinclude is not properly including the new file Peter -- Confucius said way too much ...
Re: Sending Email from a form
Hi Peter, Cannot read the message. Can you send it as quoted text please? Kind regards, Jos On Thu, Mar 5, 2015 at 6:25 PM, Peter Sparkes pe...@didm.co.uk wrote: Hi I have an application that used a form to send emails. This has worked successfully for many years. However, recently users have reported getting error messages, as per the attached. My testing has shown that: - Sometime the send email works as it should. - Sometimes it does not and the user gets the attached error message. My email javascript is: try { mms = cocoon.getComponent(Packages.org.apache.cocoon.mail.MailSender.ROLE); if (cocoon.parameters.host != || cocoon.parameters.user != ) { mms.setSmtpHost(smtp.bytemark.co.uk, cocoon.parameters.user, cocoon.parameters.password); } mms.setFrom(fromemail); mms.setTo(lodgeemail); mms.setSubject(subject); mms.setCc(i...@wolseylodges.com i...@wolseylodges.com); mms.setBody(body1, text/plain; charset=utf-8); //mms.addAttachment(cocoon.request.get(attachment)); //mms.addAttachmentURL(cocoon:///); // mms.addAttachmentURL(context://welcome.xml); mms.send(); } finally { cocoon.releaseComponent(mms); } Has anybody any ideas, please. Peter Sparkes - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- Confucius said way too much ...
Re: javascript -Java
Hi Peter, Try in your javascript/flowscript: var imagescaled = Scalr.resize(imagein, size); without the new keyword. reason: You try to call a so-called static method. Hope that helps. Jos On Fri, Sep 26, 2014 at 10:30 PM, Peter Sparkes pe...@didm.co.uk wrote: Hi, Cocoon 2.1.12 Ref http://cocoon.apache.org/2.1/userdocs/flow/java.html Please how do I associate importClass(Packages.org.imgscalr.Scalr); with its jar file imgscalr-lib-4.2.jar which I put in WEB-INF/lib Regards Peter -- Confucius said way too much ...
Re: Cocoon 2 - Webservice
Yes, that is it. If all you need to do is to generate a pdf document, your last step will be a FOP-serialization. This means that the only work is in coding your xsl:fo transform. Cheers, Jos On Mon, Apr 7, 2014 at 5:48 PM, spintus-mail...@web.de wrote: Hello, Unfortunately, I'm only now to respond. Restful was recommended to me by my instructor. I would like to send the XML file via POST to cocoon, recycle there and spend as PDF, HTML, or RTF. Currently, I have not yet an overview if there is a ready-made opportunity to Cocoon XML to accept documents through POST? Von: Jos Snellings [mailto:jos.snelli...@upperware.biz] Gesendet: Samstag, 5. April 2014 15:23 An: users@cocoon.apache.org Betreff: Re: Cocoon 2 - Webservice Hi Klaus, As REST is a principle, it is possible to implement a service in a REST-ful manner. However, is it correct to state, as your message suggests, that the service would perform a sort of document conversion of an XML document in a specified format, to a PDF file? If this is the case, my idea would be: - cocoon 2 is a good choice, no need to upgrade - do not care about the REST religion, and just generate a pdf document Jos On Sat, Apr 5, 2014 at 3:06 PM, Klaus Nuhr spintus-mail...@web.de wrote: Hello to everyone in the mailing list :), I would like to implement a WebService via Cocoon. In this case, the client should send a XML file to my service, it will be processed accordingly and delivered as a pdf back to the client. The processing of a local XML works great. Now must be implemented as a webservice. I would have preferred RESTful, but seems all so only with cocoon 3 to come. Is there in this respect a tutorial or sample code? Greetings - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- La majestueuse égalité des lois, qui interdit au riche comme au pauvre de coucher sous les ponts, de mendier dans les rues et de voler du pain. -- Anatole France - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- La majestueuse égalité des lois, qui interdit au riche comme au pauvre de coucher sous les ponts, de mendier dans les rues et de voler du pain. *-- Anatole France*
Re: Cocoon 2 - Webservice
Hi Klaus, As REST is a principle, it is possible to implement a service in a REST-ful manner. However, is it correct to state, as your message suggests, that the service would perform a sort of document conversion of an XML document in a specified format, to a PDF file? If this is the case, my idea would be: - cocoon 2 is a good choice, no need to upgrade - do not care about the REST religion, and just generate a pdf document Jos On Sat, Apr 5, 2014 at 3:06 PM, Klaus Nuhr spintus-mail...@web.de wrote: Hello to everyone in the mailing list :), I would like to implement a WebService via Cocoon. In this case, the client should send a XML file to my service, it will be processed accordingly and delivered as a pdf back to the client. The processing of a local XML works great. Now must be implemented as a webservice. I would have preferred RESTful, but seems all so only with cocoon 3 to come. Is there in this respect a tutorial or sample code? Greetings - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- La majestueuse égalité des lois, qui interdit au riche comme au pauvre de coucher sous les ponts, de mendier dans les rues et de voler du pain. *-- Anatole France*
Re: Selecting values from a html5 form
You are welcome :-) On Thu, Jul 4, 2013 at 10:55 AM, Peter Sparkes pe...@didm.co.uk wrote: Hi Jos Thorsten, I am sorry that I have not thanked you before for your help. Thank you again Regards Peter On 27/06/2013 13:39, Thorsten Scherler wrote: On 06/27/2013 02:32 PM, Jos Snellings wrote: Hi Jos, nice post! Small enhancement see above. Hi Peter, In the sitemap you have access to request parameters via Jexl: map:match pattern=enquiry map:generate type=someGeneration map:parameter name=from value={jexl:cocoon.request.parameter.fromname}/ ... However, it may be far more convenient to use the HttpRequest, as it is exposed in different ways: 1. if you want to send your user's inputs to a controller to handle them as in: map:match pattern=enquiry controller:call controller=rest-controller select=some.package.EnquiryController /controller:call /map:match The http request is accessible by just declaring it with the annotation @Inject: @Inject private HttpServletRequest request; Here you can do directly @RequestParameter private String fromname; salu2 In your doPost method (or even doGet) you can use the request: String fromName = request.getParameter(fromname); Instead of sending the input to a controller, it may happen that there is little to control, and you just want to do a model generation as a response. In that case: if you are declaring: public class SomeViewGenerator extends AbstractSAXGenerator { You may override the setup member : public void setup(MapString, Object parameters) { try { request = HttpContextHelper.getRequest(parameters); The setup member is just called at pipeline setup, and when this happens in a web application context, the http request is just one of the parameters. I hope this little expose helps, Jos On Thu, Jun 27, 2013 at 10:32 AM, Peter Sparkes pe...@didm.co.uk wrote: Hi, I want to use a html5 form to pass values into my sitemap eg form action=enquiry method=? input type=text name=fromnameplaceholder=Your Name required=''/ How do I pass fromname into enquiry Regards Peter - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain -- Thorsten Scherler scherler.at.gmail.com codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/ -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: Selecting values from a html5 form
Hi Peter, In the sitemap you have access to request parameters via Jexl: map:match pattern=enquiry map:generate type=someGeneration map:parameter name=from value={jexl:cocoon.request.parameter.fromname}/ ... However, it may be far more convenient to use the HttpRequest, as it is exposed in different ways: 1. if you want to send your user's inputs to a controller to handle them as in: map:match pattern=enquiry controller:call controller=rest-controller select=some.package.EnquiryController /controller:call /map:match The http request is accessible by just declaring it with the annotation @Inject: @Inject private HttpServletRequest request; In your doPost method (or even doGet) you can use the request: String fromName = request.getParameter(fromname); Instead of sending the input to a controller, it may happen that there is little to control, and you just want to do a model generation as a response. In that case: if you are declaring: public class SomeViewGenerator extends AbstractSAXGenerator { You may override the setup member : public void setup(MapString, Object parameters) { try { request = HttpContextHelper.getRequest(parameters); The setup member is just called at pipeline setup, and when this happens in a web application context, the http request is just one of the parameters. I hope this little expose helps, Jos On Thu, Jun 27, 2013 at 10:32 AM, Peter Sparkes pe...@didm.co.uk wrote: Hi, I want to use a html5 form to pass values into my sitemap eg form action=enquiry method=? input type=text name=fromnameplaceholder=Your Name required=''/ How do I pass fromname into enquiry Regards Peter --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: XSLT import/include errors
Hi Francesco et al, Good idea. Where would you put the lever to switch LRU cache on/off? - sitemap? - cocoon spring configuration files? So, the context is limited to developers who want to keep seeing instant results ... Cheers, Jos On Mon, Jun 24, 2013 at 9:43 AM, Francesco Chicchiriccò ilgro...@apache.org wrote: On 22/06/2013 11:25, gelo1234 wrote: And of course I'm using noncaching pipeline :) When I make a change in the main XSL file (that from sitemap), the change is visible. When I make a change in any of the imported/included (from main XSL) XSL file, the change is not visible. Cocoon serves the Content from cache.-- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~** ilgrosso/ http://people.apache.org/~ilgrosso/ Hi, this has nothing to do with pipeline caching: with pipeline caching, the whole pipeline execution is cached (in memory, by default) and thus subsequent calls to the same pipeline won't trigger any pipeline component execution. What is causing you headaches (same did to me) is a local LRU cache managed by some SAX components, including the XSLTTransformer [1]; as you can see from the load() method, in fact, only the last modified timestamp of the main XSLT file is taken into account for deciding whether the cached template should be read. The local LRU cache is very useful in production but very annoying during development: I guess it should stay enabled by default - as currently - but also given the possibility to switch it off via some configuration parameter: who wants to file an issue on JIRA and provide a patch? ;-) Regards. [1] http://svn.apache.org/repos/**asf/cocoon/cocoon3/trunk/** cocoon-sax/src/main/java/org/**apache/cocoon/sax/component/** XSLTTransformer.javahttp://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~**ilgrosso/http://people.apache.org/~ilgrosso/ --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: XSLT import/include errors
OK, having a short look for: configurator:settings configurator:property name=org.apache.cocoon.sax.lrucache-enabled value=true/ later today On Mon, Jun 24, 2013 at 10:05 AM, Francesco Chicchiriccò ilgro...@apache.org wrote: On 24/06/2013 09:57, Jos Snellings wrote: Hi Francesco et al, Good idea. Where would you put the lever to switch LRU cache on/off? - sitemap? - cocoon spring configuration files? +1 for settings - as currently done for sitemap reload, for example. Regards. So, the context is limited to developers who want to keep seeing instant results ... Cheers, Jos On Mon, Jun 24, 2013 at 9:43 AM, Francesco Chicchiriccò ilgro...@apache.org wrote: On 22/06/2013 11:25, gelo1234 wrote: And of course I'm using noncaching pipeline :) When I make a change in the main XSL file (that from sitemap), the change is visible. When I make a change in any of the imported/included (from main XSL) XSL file, the change is not visible. Cocoon serves the Content from cache.-- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ Hi, this has nothing to do with pipeline caching: with pipeline caching, the whole pipeline execution is cached (in memory, by default) and thus subsequent calls to the same pipeline won't trigger any pipeline component execution. What is causing you headaches (same did to me) is a local LRU cache managed by some SAX components, including the XSLTTransformer [1]; as you can see from the load() method, in fact, only the last modified timestamp of the main XSLT file is taken into account for deciding whether the cached template should be read. The local LRU cache is very useful in production but very annoying during development: I guess it should stay enabled by default - as currently - but also given the possibility to switch it off via some configuration parameter: who wants to file an issue on JIRA and provide a patch? ;-) Regards. [1] http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/ -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: Remove XML declaration and html DOCTYPE
Hi Mansour, Try: map:serialize type=xhtml map:parameter name=omit-xml-declaration value=yes/ /map:serialize On Wed, Jun 19, 2013 at 5:14 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: sorry, my fault. I didn't tell the version. I am using C3.0 On Wed, Jun 19, 2013 at 11:05 AM, Bhavya Sharma bhavyasha...@gmail.comwrote: try this map:serializer name=xml-omit mime-type=text/html src=org.apache.cocoon.serialization.XMLSerializer encodingUTF-8/encoding omit-xml-declarationtrue/omit-xml-declaration /map:serializer On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy joelmcconau...@gmail.com wrote: Try this... map:serializer name=xml-omit mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer encodingUTF-8/encoding omit-xml-declarationtrue/omit-xml-declaration /map:serializer On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: How do I remove the xml declaration and doctype from xml and html serializes ?? -- Joel McConaughy 206-300-4732 joelmcconau...@gmail.com -- *Thanks with regards * *Bhavya Sharma* निष्काम -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: Remove XML declaration and html DOCTYPE
Replying to my own: map:serialize type=exhtml map:parameter name=omit-xml-declaration value=yes/ /map:serialize That should work if you include cocoon-optional in your dependencies. Cheers, Jos On Wed, Jun 19, 2013 at 5:29 PM, Jos Snellings jos.snelli...@upperware.bizwrote: Hi Mansour, Try: map:serialize type=xhtml map:parameter name=omit-xml-declaration value=yes/ /map:serialize On Wed, Jun 19, 2013 at 5:14 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: sorry, my fault. I didn't tell the version. I am using C3.0 On Wed, Jun 19, 2013 at 11:05 AM, Bhavya Sharma bhavyasha...@gmail.comwrote: try this map:serializer name=xml-omit mime-type=text/html src=org.apache.cocoon.serialization.XMLSerializer encodingUTF-8/encoding omit-xml-declarationtrue/omit-xml-declaration /map:serializer On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy joelmcconau...@gmail.com wrote: Try this... map:serializer name=xml-omit mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer encodingUTF-8/encoding omit-xml-declarationtrue/omit-xml-declaration /map:serializer On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: How do I remove the xml declaration and doctype from xml and html serializes ?? -- Joel McConaughy 206-300-4732 joelmcconau...@gmail.com -- *Thanks with regards * *Bhavya Sharma* निष्काम -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
ServletURLConnection
Hi ! Has anyone seen the exeption below before? java.io.IOException: Can't create ServletURLConnection servlet:/openid/formredirection. caused by org.apache.cocoon.servletservice.NoCallingServletServiceRequestAvailableException: A self-reference requires an active servlet request. Kind regards, Jos -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: cocoon 2.1.12 - memory
Does the site happen to use Avalon Datasource objects? Jos On Mon, Apr 15, 2013 at 11:38 AM, Peter Sparkes pe...@didm.co.uk wrote: On 15/04/2013 10:09, Thorsten Scherler wrote: On 04/15/2013 10:31 AM, Peter Sparkes wrote: Hi Francesco, I have a fairly large 2.1.11 website which has 700+ visits a day. Every few days the site goes down unless I stop and start it every day ( using Crontab). I have also increased the available memory export CATALINA_OPTS=-Xms1024m -Xmx1024m When the site goes down the pid is still there and has to be deleted before the site will start I assume that the problem is a memory leak as there is a lot on the web on it I remember that there where a problem with a xalan version, you can check whether the version is different from 11 to 12 of the xalan lib and if so then yes it fixes a memory leak whether it is the one that is bothering you I am not 100% sure but I would give it a try. salu2 Thanks Salu2 I am using the latest version of saxon, not xalan, so that should not be the problem Peter Regards Peter On 12/04/2013 07:24, Francesco Chicchiriccň wrote: On 12/04/2013 07:50, Peter Sparkes wrote: Hi, Has 2.1.12 fixed the 2.1.11 memory leak Hi, could you be a little less generic? Are you referrring to any specific issue? Any link to e-mail or JIRA? Regards. --**--** - To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: cocoon 2.1.12 - memory
Just a possibility. I exploit a site where that causes the heap to get consumed. Do not know about others. Next shot: are there explicit creations (from java/xsp) of parsers (sax/dom)? Jos On Mon, Apr 15, 2013 at 12:00 PM, Peter Sparkes pe...@didm.co.uk wrote: I am not sure, but I don't think so. All data in held and manipulated as xml files. Its fast and easy to program etc Peter On 15/04/2013 10:44, Jos Snellings wrote: Does the site happen to use Avalon Datasource objects? Jos On Mon, Apr 15, 2013 at 11:38 AM, Peter Sparkes pe...@didm.co.uk wrote: On 15/04/2013 10:09, Thorsten Scherler wrote: On 04/15/2013 10:31 AM, Peter Sparkes wrote: Hi Francesco, I have a fairly large 2.1.11 website which has 700+ visits a day. Every few days the site goes down unless I stop and start it every day ( using Crontab). I have also increased the available memory export CATALINA_OPTS=-Xms1024m -Xmx1024m When the site goes down the pid is still there and has to be deleted before the site will start I assume that the problem is a memory leak as there is a lot on the web on it I remember that there where a problem with a xalan version, you can check whether the version is different from 11 to 12 of the xalan lib and if so then yes it fixes a memory leak whether it is the one that is bothering you I am not 100% sure but I would give it a try. salu2 Thanks Salu2 I am using the latest version of saxon, not xalan, so that should not be the problem Peter Regards Peter On 12/04/2013 07:24, Francesco Chicchiriccň wrote: On 12/04/2013 07:50, Peter Sparkes wrote: Hi, Has 2.1.12 fixed the 2.1.11 memory leak Hi, could you be a little less generic? Are you referrring to any specific issue? Any link to e-mail or JIRA? Regards. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain -- We should be careful to get out of an experience only the wisdom that is in it - and stay there, lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again - and that is well; but also she will never sit down on a cold one any more. -- Mark Twain http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: Dom Transformer
Not sure what your usage is, Mansour. If your program has to generate references to things that 'yet have to come' in the input stream, of course you get quickly into thinking 'DOM'-wise. - I believe Stax can bring outcome, but no experience with this. - I once wrote a 'SAX-recorder', so somefilter that records SAX-elements, but do not remember exactly what problem that solved, just that it worked. - it is possible to trap SAX-events and feed them into a JDom object. (I mean, if nothing else works). Cheers, Jos On Fri, Mar 15, 2013 at 8:01 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Jos, thank you. I though about this. The problem is, the documents I am processing had to go through a pipeline processing before I need to use DOM transformation on them. So a generator is not an option, and I am using C3. On Fri, Mar 15, 2013 at 2:58 PM, Jos Snellings jos.snelli...@upperware.biz wrote: You can, within a generator class, (C3), or within an xsp (C 2). Sometimes such things come in handy. If you mean, configure one from the sitemap, I see no uses. Cheers, Jos On Fri, Mar 15, 2013 at 7:05 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: I know this may sound strange, but I like to create a transformation with DOM. I was able to see Stax and Sax transformation. I was not able to see one for DOM. Any advice ?? Examples ?? - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: Relative path for images in FOP
It depends, Where is fop.xconf? In this file you can specify a 'base' parameter, relative to the location of the file. Cheers, Jos On Sun, Mar 10, 2013 at 7:18 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: I have this: fo:block fo:external-graphic src=url('logo.png') height=2.00in width=5.00in / xsl:apply-templates select=head / .. I am getting this in the logs: 2013-03-10 01:12:29,952 btpool0-1 ERROR apps.FOUserAgent - Image not found. URI: logo.png. (No context info available) And of course the image doesn't show on the generated pdf page. I tried all possible combinations of the image path: src=logo.png src=url('COB-INF/xslts/fo/logo.png') The only thing that worked was the absolute path. However, this is not an option when deploying to the server. So my question is, how do I get fo2pdf serializer to resolve relative paths ?? Thank you. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: from Cforms to Wicket
Nice overview! On Mon, Feb 18, 2013 at 5:23 PM, gelo1234 gelo1...@gmail.com wrote: IMHO if you are dealing with XML data, there are only two valid choices: XSLT or XQuery. Both can be used with Cocoon. XSLT is standard Cocoon supported (by XSLTTransformer), XQuery support for Cocoon exists in XQueryGenerator from eXistDB ( http://www.exist-db.org) Whin one to use ? :) I prefer XSLT, but you can choose the other [1]. XSLT has the best support in Cocoon. XSLT is much simpler in my opinion and it enables us to generate ANY Content/Transformation with XML data. XSLT is pretty well supported in most IDEs, be it Eclipse or NetBeans. Im not aware of any stack/framework that could be built on top of XSLT (as a superset?). Actually XSLT is pretty much 4GL [2]. It is declarative in its form so simple and yet with LEGO-like Cocoon sitemaps approach best suited for very clean/RAD apps. I also suggest taking a diversed approach to development with Cocoon. What I mean by diversed is that you don't necessarily have to stick to Cocoon tools only. In its 3.0 release Cocoon is considered to be used across different development environments, even in its simplest form as a library for e.g. Java EE or Spring application. Personally I prefer to use it as a mediation proxy with ESB-like features and use the right tools/frameworks for your job. For me it means: Java on server, Javascript/HTML on the client. Using Java on the client side in terms of Web app (as its with Wicket) is IMHO very bad and ugly idea. Other indirect uses of Java thats compiled into Javascript (like GWT, Vaadin, Errai,) is also kind of obscure and heavy-weight. I dare to claim they will loose its share in future HTML5 development. Just use the right (and LIGHTWEIGHT ;) tool for your job :) Greetings, Greg [1] www.w3.org/2006/Talks/0525-www2006-Kay.pdf [2] http://en.wikipedia.org/wiki/Fourth-generation_programming_language 2013/2/18 Mika M Lehtonen m...@digikartta.net Yep, but as I started this chain, I stated that my problem is to convert my own defined dynamic XML into HTML4 (or HTML5) forms. I was looking something to replace Cforms (not just plain XSLT). I am also considering to move to C3 because as I stated earlier, developing without tools is hard. If I could take e.g. NetBeans and continue with that, I would be better off in the long run. I was considering Apache Wickets because some integration has been done with C3, but right now it doesn't seem to be a real option. HTML5 is still hype from my point of view. - mika - 18.2.2013 15:50, gelo1234 kirjoitti: HTML5 in its basics is a superset of HTML4. If you don't use HTML5-specific tags/spec you go well with old good HTML4. The original issue was NOT whether to use HTML5 or old HTML, but whether to use CForms or just raw XHTML/HTML (4 or 5) forms. If you like to have HTML5 goodies in browsers that support it, just use e.g. Cocoon Actions in Sitemap OR Advanced Sitemap Matchers OR in REST-Controller by inspecting HTTP Headers return different Page that generate a different Content (with XSLT) for IE8. Greetings, -Greg 2013/2/18 Mika M Lehtonen m...@digikartta.net Also HTML5 support for IE seems to be weak, even for IE9. There are still lot of people using IE8 or even older browser + lot of people in some sort of governmental offices using their own versions.. We can't sell apps without IE-support, absolutely no way. http://people.mozilla.com/~prouget/ie9/ - mika - 18.2.2013 14:45, Robby Pelssers kirjoitti: The only thing I wonder about is... Cocoon and neither XSLT2.0 support html5 serialization for all I know. So does someone using Cocoon already generate HTML5 content with Cocoon and how did you accomplish this. Cheers, Robby -Original Message- From: Mika M Lehtonen [mailto:m...@digikartta.net] Sent: Monday, February 18, 2013 1:42 PM To: users@cocoon.apache.org Subject: Re: from Cforms to Wicket Ok, thanks for your efforts. HTML5 it is, with or without C3. - mika - 18.2.2013 14:25, Francesco Chicchiriccò kirjoitti: On 18/02/2013 13:09, Mika M Lehtonen wrote: Yeah, I know what you mean. Most of the Xforms sites are dated back to 2002 or 2003.. Sounds like a standard having glorious future behind.. This betterForm still sounded proper for my purposes because it actually implements server-side approache of Xforms. So I could use Xforms definition for producing HTML-forms, if I understood right. It actually resembles a lot of Cforms with a difference that it seems to be under development taking contemporary challenges into account. under development with latest release 4.1 dating 1 year back [1] But would I still need C3 (or C2.11 / C2.2)? It depends on you, and on how much effort do you want to put on this task. Anyway, not necessarily, even though Cocoon will help in you in the XML side if the job. I would like to get familiar with C3 if I
Re: [C2.2] Provide or consume Webservices with Cocoon 2.2
Hi Matthias, As a matter of fact, cocoon can host spring modules. You can plug in most every module using the well-known IoC mechanism. In a typical block you will be able to configure things in the META-INF/cocoon/spring folder. This is in my opinion one of the strong points of C3 over C2.2. Cheers, Jos On Mon, Jan 21, 2013 at 8:59 AM, Matthias Müller pym...@yahoo.de wrote: I guess upgrading to Cocoon 3 means a lot of work. Please correct me, if I'm wrong here. I'm not to deep in cocoon development, so maybe I'm totally wrong with the following idea: There is a Cocoon spring integration. Does that mean that coccon can host spring modules? Could I maybe use the a spring webservice here? Regards, Matthias -- *Von:* Francesco Chicchiriccò ilgro...@apache.org *An:* users@cocoon.apache.org *Gesendet:* 12:32 Samstag, 19.Januar 2013 *Betreff:* Re: [C2.2] Provide or consume Webservices with Cocoon 2.2 On 17/01/2013 14:26, Matthias Müller wrote: Hi there, are there any tutorials / samples about implementing webservice support in cocoon 2.2. All the sources I found are based on Cocoon 2.1x, e.g. http://wiki.apache.org/cocoon/WebServiceServer Hi Matthias, I don't think there is any different sample for C2.2; possibly, the wiki page content mentioned above shouldn't be hard to upgrade to C2.2, but I cannot help you in this field, unfortunately. If you are interested in webservice with Cocoon, I would suggest Cocoon 3 (not yet fully released but already proven stable) with a dedicated support for REST [1]. Regards. [1] http://cocoon.apache.org//3.0/reference/html/webapps.html#webapps.rest -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/ -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: [C2.2] Provide or consume Webservices with Cocoon 2.2
I was not referring to cocoon-spring-configurator explicitly. In my application, I have configured extra run time dependencies via spring. The configuration files are gracefully picked up. But this is cocoon-3. I have no experience with c 2.2. However, it is not difficult to give it a try Jos On Mon, Jan 21, 2013 at 1:26 PM, Francesco Chicchiriccò ilgro...@apache.org wrote: On 21/01/2013 09:45, Matthias Müller wrote: I thought that the spring integration is also part of Cocoon 2.2 !? If Jos is referring to the cocoon-spring-configurator, I confirm that it is included in C2.2 (and C3, of course). Unfortunately, I don't know if there is any sample of this kind available. If you succeed with this approach, please report. Regards. -- *Von:* Jos Snellings jos.snelli...@upperware.bizjos.snelli...@upperware.biz *An:* users@cocoon.apache.org; Matthias Müller pym...@yahoo.depym...@yahoo.de *Gesendet:* 9:28 Montag, 21.Januar 2013 *Betreff:* Re: [C2.2] Provide or consume Webservices with Cocoon 2.2 Hi Matthias, As a matter of fact, cocoon can host spring modules. You can plug in most every module using the well-known IoC mechanism. In a typical block you will be able to configure things in the META-INF/cocoon/spring folder. This is in my opinion one of the strong points of C3 over C2.2. Cheers, Jos On Mon, Jan 21, 2013 at 8:59 AM, Matthias Müller pym...@yahoo.de wrote: I guess upgrading to Cocoon 3 means a lot of work. Please correct me, if I'm wrong here. I'm not to deep in cocoon development, so maybe I'm totally wrong with the following idea: There is a Cocoon spring integration. Does that mean that coccon can host spring modules? Could I maybe use the a spring webservice here? Regards, Matthias -- *Von:* Francesco Chicchiriccò ilgro...@apache.org *An:* users@cocoon.apache.org *Gesendet:* 12:32 Samstag, 19.Januar 2013 *Betreff:* Re: [C2.2] Provide or consume Webservices with Cocoon 2.2 On 17/01/2013 14:26, Matthias Müller wrote: Hi there, are there any tutorials / samples about implementing webservice support in cocoon 2.2. All the sources I found are based on Cocoon 2.1x, e.g. http://wiki.apache.org/cocoon/WebServiceServer Hi Matthias, I don't think there is any different sample for C2.2; possibly, the wiki page content mentioned above shouldn't be hard to upgrade to C2.2, but I cannot help you in this field, unfortunately. If you are interested in webservice with Cocoon, I would suggest Cocoon 3 (not yet fully released but already proven stable) with a dedicated support for REST [1]. Regards. [1] http://cocoon.apache.org//3.0/reference/html/webapps.html#webapps.rest -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/ -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
html without entities
Dear group, I am looking for a html serializer that generates just UTF-8, and does not bother to convert diacritics to html entities. You can do that with xhtml, yes. However, xhtml is a bit of a nuisance: scripts, different renderings. Are there options? Cheers, Jos -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: beginner q: possible to set extension .xsl as type='xslt' by default?
Dear Tom, Can you send your sitemap.xmap over? For cocoon, the default transformation is an xslt. If you are just starting with a migration, you may want to consider using cocoon 3, which is at the moment in beta, but soon the production version will be ready (@others: isn't it ? :-) Kind regards, Jos On Tue, Oct 16, 2012 at 3:55 PM, whatnext tom_gra...@yahoo.co.uk wrote: Dear learned cocoon users, Very sorry for the ignorance of this question. Our company has recently decided it might be time to move away from AxKit (!) and we are looking at the alternatives. Cocoon is an obvious choice. However, I know absolutely nothing about it other than a broad idea of what it does. I have been trying to get Cocoon to serve some of our pages to see whats involved. I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html and sure enough could display the welcome page. Next up I tried to display one of our web pages by copying over an .xml and related .xsl stylesheets and modifying the sitemap.xmap file. So then it falls over saying: Unable to get transformer handler for file:///path/example.xsl ... If I go into sitemap.xmap and add type=xslt to the map:transform src = '...' line then this error seems resolved but then it falls over with Unable to get transformer handler for file:///path/another.xsl where another.xsl is referred to by example.xsl. What can be done in this case? Is there a way of telling cocoon that it needs to use the xslt transformer anywhere it sees .xsl... ? Or am i approaching this in all the wrong way etc.? Many apologies for the elementary nature of this question - I freely admit I have no idea what I am doing! Any help appreciated... -- View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- All generous minds have a horror of what are commonly called Facts. They are the brute beasts of the intellectual domain. -- Thomas Hobbes http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html
Re: more encoding problems
Hi Mika, Your page declares utf-8 as a character set, but the text you send is not in utf-8. Hence the question mark characters. Question 1: is it the same database that is accessed? (or rather, a copy) Question 2: what is the database url? Cheers, Jos On Thu, Sep 20, 2012 at 9:22 AM, m...@digikartta.net wrote: Hi, C2.11, I moved my app from one server to another, which resulted some pages to broke that is scands won't encode properly. I have this in my sitemap: map:match pattern=linkki/html/* map:generate src=cocoon:/linkki/{1} type=text /map:generate !--map:transform type=xslt src=linkki.xslt/-- map:serialize type=text /map:serialize /map:match map:match pattern=linkki/* map:read type=databasereader src=0 mime-type=text/plain !-- option sitemap parameters -- map:parameter name=table value=arvot/ map:parameter name=image value=arvo_varchar/ map:parameter name=key value=fake/ map:parameter name=where value=id={1}/ /map:read /map:match You can try this out: Old server http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841works http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841works New server http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059works http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059doesn't work !! Any thoughts? I have tried a lot of things without success. - mika - --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: more encoding problems
What does your web.xml look like? On Thu, Sep 20, 2012 at 2:51 PM, m...@digikartta.net wrote: Also XML-element tags in xsp-files have question marks instead of scands. I also verified that the database is delivering the right stuff. The same database used in this (http://88.148.163.59/cocoon/** palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059), works with local copy of cocoon. Updated data, just checked this out. Even this one will fail. sitemap: map:match pattern=koe map:generate type=serverpages src=koe.xsp /map:generate map:serialize type=xml/ /map:match koe.xsp: ?xml version=1.0 encoding=utf-8? xsp:page language=java xmlns:xsp=http://apache.org/**xsp http://apache.org/xsp page Äiti/Äiti /page /xsp:page Works locally. - mika - On Thu, 20 Sep 2012 15:14:35 +0300, m...@digikartta.net wrote: Hi Jos, yep, that's right, the text seems not to be utf-8. Same problem occurs in another page where the text not working comes from flowscript. 1) No it's not, it's a copy. But you can verify everything is ok in http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059(database reader). Seems to me, that the text falls apart in the text generator. 2) the url is in private network - mika - On Thu, 20 Sep 2012 11:42:32 +0200, Jos Snellings jos.snelli...@upperware.biz wrote: Hi Mika, Your page declares utf-8 as a character set, but the text you send is not in utf-8. Hence the question mark characters. Question 1: is it the same database that is accessed? (or rather, a copy) Question 2: what is the database url? Cheers, Jos On Thu, Sep 20, 2012 at 9:22 AM, wrote: Hi, C2.11, I moved my app from one server to another, which resulted some pages to broke that is scands won't encode properly. I have this in my sitemap: You can try this out: Old server http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841[2] works http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841[3] works New server http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[4] works http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[5] doesn't work !! Any thoughts? I have tried a lot of things without success. - mika - --**--** - To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[6] For additional commands, e-mail: users-h...@cocoon.apache.org [7] -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson Links: -- [1] mailto:m...@digikartta.net [2] http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841 [3] http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841 [4] http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059 [5] http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059 [6] mailto:users-unsubscribe@**cocoon.apache.orgusers-unsubscr...@cocoon.apache.org [7] mailto:users-help@cocoon.**apache.org users-h...@cocoon.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: more encoding problems
Just wanted to have a look. I compared to with what I had, and it is the same. No luck. On Thu, Sep 20, 2012 at 3:18 PM, m...@digikartta.net wrote: if you are referring to this part, it's like this: init-param param-namecontainer-**encoding/param-name param-valueISO-8859-1/**param-value /init-param !-- Set form encoding. This will be the character set used to decode request parameters. If not set the ISO-8859-1 encoding will be assumed. -- init-param param-nameform-encoding/**param-name param-valueUTF-8/param-**value /init-param Or some else setting you are interested in? This works home and this works in another remote server. I also copied the java from working server to this, but nada.. Tomcat is different, server.xml clone. On Thu, 20 Sep 2012 15:05:33 +0200, Jos Snellings jos.snelli...@upperware.biz wrote: What does your web.xml look like? On Thu, Sep 20, 2012 at 2:51 PM, wrote: Also XML-element tags in xsp-files have question marks instead of scands. I also verified that the database is delivering the right stuff. The same database used in this (http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[2]), works with local copy of cocoon. Updated data, just checked this out. Even this one will fail. sitemap: koe.xsp: Works locally. - mika - On Thu, 20 Sep 2012 15:14:35 +0300, wrote: Hi Jos, yep, that's right, the text seems not to be utf-8. Same problem occurs in another page where the text not working comes from flowscript. 1) No it's not, it's a copy. But you can verify everything is ok in http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[5] (database reader). Seems to me, that the text falls apart in the text generator. 2) the url is in private network - mika - On Thu, 20 Sep 2012 11:42:32 +0200, Jos Snellings wrote: Hi Mika, Your page declares utf-8 as a character set, but the text you send is not in utf-8. Hence the question mark characters. Question 1: is it the same database that is accessed? (or rather, a copy) Question 2: what is the database url? Cheers, Jos On Thu, Sep 20, 2012 at 9:22 AM, wrote: Hi, C2.11, I moved my app from one server to another, which resulted some pages to broke that is scands won't encode properly. I have this in my sitemap: You can try this out: Old server http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841[7] [2] works http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841[8] [3] works New server http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[9] [4] works http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[10] [5] doesn't work !! Any thoughts? I have tried a lot of things without success. - mika - --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[11] [6] For additional commands, e-mail: users-h...@cocoon.apache.org [12] [7] -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson Links: -- [1] mailto:m...@digikartta.net [13] [2] http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841[14] [3] http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841[15] [4] http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[16] [5] http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[17] [6] mailto:users-unsubscribe@**cocoon.apache.orgusers-unsubscr...@cocoon.apache.org[18] [7] mailto:users-help@cocoon.**apache.org users-h...@cocoon.apache.org[19] --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[20] For additional commands, e-mail: users-h...@cocoon.apache.org [21] --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[22] For additional commands, e-mail: users-h...@cocoon.apache.org [23] -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson Links: -- [1
Re: back button results in a blank
Hi Paul, The browser's back button problem is not a specific cocoon one. I believe that it could have different causes. It is even browser specific, I believe. The back button is just supposed to show the previous viewed resource. I usually stick to 'restful design principles'. This may help to alleviate back button issues. As a principle, I never make webapps block the back button. I know this sounds a bit vague, but it's for the moment my best shot. Anyone else? Kind regards, Jos On Tue, Aug 21, 2012 at 8:47 PM, Paul Joseph pjos...@gmail.com wrote: Hi there, I notice that many times when I click the browser's back button, when I expect to see the form previously that was displayed, instead I get a blank page and have to click the browser's refresh button to retrieve what was there. This is IE8 in particular. Is there any simple way to preserve what was there before so that on clicking the back button it displays directly instead of having to click refresh on a blank page? paul --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Sitemap: path matching
Hi all, I am looking for a way to pass a variable number of sitemap parameters to a sitemap component: I explain the use case: ** stands for non-greedy multiple segment matcher, no? map:match pattern=retrievebypath/**/{name}.{extension} map:generate type=retrieve map:parameter ? /map:generate /map:match Of course you could {1}, {2}, {3} but that is a clutch. Is there an elegant way? Kind regards, Jos -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: Sitemap: path matching
Hi Robby, Here's an example: a href=matchbypath/virtualrootfolder/themes/conservation/index.html conservation /a = this is to be a hit for a matcher, and what I would like to pass to the generator: matchbypath/{path}/{name}.{extension} Of course, the pipeline matcher cannot know how many segments there will be. Cheers, Jos On Thu, May 24, 2012 at 4:38 PM, Robby Pelssers robby.pelss...@nxp.comwrote: Can you give a few possible examples of the pattern that you’re trying to match? ** ** Ps. Maybe a bit nasty as solution but let’s say you want to handle multiple productId’s ** ** ** ** Pattern=”generateProduct/*” ** ** Example ** ** generateProduct/[P1, P2, P3] ** ** You just pass ‘[P1,P2,P3]’ to your generator as a single argument and let the generator extract the ids. ** ** Robby ** ** *From:* Jos Snellings [mailto:jos.snelli...@upperware.biz] *Sent:* Thursday, May 24, 2012 4:31 PM *To:* cocoon-us...@apache.org *Subject:* Sitemap: path matching ** ** Hi all, I am looking for a way to pass a variable number of sitemap parameters to a sitemap component: I explain the use case: ** stands for non-greedy multiple segment matcher, no? map:match pattern=retrievebypath/**/{name}.{extension} map:generate type=retrieve map:parameter ? /map:generate /map:match Of course you could {1}, {2}, {3} but that is a clutch. Is there an elegant way? Kind regards, Jos -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: Sitemap: path matching
Yep, I will give that a try ! Thanks, Robby, Jos
CocoonJAXRSServlet
Dear all, Cocoon-3 ordinary pipeline components offer a flexible way to organise REST-full calls between services. (REST, after all is a principle, not a framework). However, curiosity drove me into setting up a small example of a JAX-RS webservice. 1. with mvn jetty:run : works perfectly 2. as a block in a standalone war context, deployed to tomcat : java.lang.NoClassDefFoundError: com/sun/jersey/spi/container/servlet/ServletContainer This is configured in cocoon-rest. Does it need the jersey container or can we get rid of it? Kind regards, Jos -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: Cocoon 2.1 web application base path
Hi ! What are you trying to achieve? Jos On Wed, May 16, 2012 at 6:52 AM, Bob Harrod rjhar...@gmail.com wrote: I'm quite new to cocoon, and supporting an older version (2.1). Does anyone know how I can gain access the web application base path inside of a transform? Of course, it can be passed by the sitemap... Any help would be appreciated! Thanks! -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: mount named blocks inconvenience
O yes, Francesco, that is in every way a good workaround. Thanks, Jos On Fri, May 11, 2012 at 12:43 PM, Francesco Chicchiriccò ilgro...@apache.org wrote: On 10/05/2012 13:05, Jos Snellings wrote: Dear cocooners, Problem: 1. In the definition of a named block, for: servlet:context mount-path=/foo context-path=blockcontext:/foo// This tells the cocoon servlet that a block foo is mounted on foo in the webapp. 2. sitemap.xmap An empty matcher like in the cocoon sample: map:match pattern= map:read src=welcome.html mime-type=text/html/ /map:match 3. call localhost/mywebapp/foo or, the root of the block. (it is configured correctly, all the rest works). EVENT: exception: For named blocks java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:687) at org.apache.cocoon.sitemap.node.MatchNode.invoke(MatchNode.java:89) Without having it investigated in extenso, it seems that when blocks are named, so not mounted as 'root block', that there is a problem with excerpt String testValue = resolvedValue == null ? null : resolvedValue.toString(); if (testValue == null) { testValue = invocation.getRequestURI(); if (testValue.charAt(0) == '/') { testValue = testValue.substring(1); } } /excerpt The value is null. By the way, localhost/mywebapp/foo/ nicely produces the expected welcome page. Anyone knows this problem? I've seen this since my first experiments with Cocoon 2.0 (and I am sure that if you search archives you would also get some better reply than this...): basically, http://localhost/mywebapp/foo and http://localhost/mywebapp/foo/ are two different HTTP resources; the root of matching for a given block (i.e. map:match pattern=) will always get not more than foo/. If you want to match http://localhost/mywebapp/foo, I think you'll have to mount something at root (say a 'bar' block) servlet:context mount-path= context-path=blockcontext:/bar/ then inside this bar block have map:match pattern=foo ... I hope all this is formally correct: if not, it's the way I've been following so far ;-) Regards. -- Francesco Chicchiriccò Apache Cocoon PMC and Apache Syncope PPMC Memberhttp://people.apache.org/~ilgrosso/ -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
mount named blocks inconvenience
Dear cocooners, Problem: 1. In the definition of a named block, for: servlet:context mount-path=/foo context-path=blockcontext:/foo// This tells the cocoon servlet that a block foo is mounted on foo in the webapp. 2. sitemap.xmap An empty matcher like in the cocoon sample: map:match pattern= map:read src=welcome.html mime-type=text/html/ /map:match 3. call localhost/mywebapp/foo or, the root of the block. (it is configured correctly, all the rest works). EVENT: exception: For named blocks java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:687) at org.apache.cocoon.sitemap.node.MatchNode.invoke(MatchNode.java:89) Without having it investigated in extenso, it seems that when blocks are named, so not mounted as 'root block', that there is a problem with excerpt String testValue = resolvedValue == null ? null : resolvedValue.toString(); if (testValue == null) { testValue = invocation.getRequestURI(); if (testValue.charAt(0) == '/') { testValue = testValue.substring(1); } } /excerpt The value is null. By the way, localhost/mywebapp/foo/ nicely produces the expected welcome page. Anyone knows this problem? Kind regards, Jos -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
fop fonts
Dear group, In C3, I need to load extra fonts for FOP. The default set cannot display cyrillic characters, and greek characters with diacritics. Where would one put them best? What is best to configure the fopFactory? Where should the configuration file be? Just before I experiment a bit to find it out, probably somebody out there knows the answer. Thank you ! Jos -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
log levels
Dear group, C3: Departing from the log4j.xml from the sample configuration I try to get rid of the DEBUG-level lines from the sitemap and pipelines. However, no matter what level I specify for the ROOT logger (logging to consoleappender), these DEBUG messages keep appearing. I see no other log4j.xml on the classpath. Am I overlooking something? Kind regards, Jos -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: log levels
OK, that is good news. Thank you, Thorsten. Jos On Wed, May 2, 2012 at 3:27 PM, Thorsten Scherler scher...@gmail.comwrote: On 05/02/2012 03:11 PM, Jos Snellings wrote: Dear group, C3: Departing from the log4j.xml from the sample configuration I try to get rid of the DEBUG-level lines from the sitemap and pipelines. However, no matter what level I specify for the ROOT logger (logging to consoleappender), these DEBUG messages keep appearing. I see no other log4j.xml on the classpath. Am I overlooking something? If you talk about current beta log4j has been droped. Create a src/main/resources/logback.xml (when target is war deploy) or cl-config/WEB-INF/classes/**logback.xml (when you use jetty:run) in your project and c3 will use that. HTH salu2 -- Thorsten Scherlerscherler.at.gmail.com** codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/ --**--**- To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- The doctrine of human equality reposes on this: that there is no man really clever who has not found that he is stupid. -- Gilbert K. Chesterson
Re: parent of parent artifact?
Thanks for sharing this, Thorsten. How do your poms then all fit together? Via a parent pom? I have to draw up an architecture for a similar project: XML content is addressable via web services. (not necessarily cocoon). Cheers, Jos On 03/10/2012 01:27 AM, Thorsten Scherler wrote: major dep to the gui block which then has the deps - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: parent of parent artifact?
And thanks, Robby! I was considering a couple of alternatives. This makes it clearer. Jos On 03/10/2012 06:20 PM, Robby Pelssers wrote: Hi Jos, Just speaking for myself here but the parent pom is mostly a pom that you just reference because it contains a list of dependencies including the version numbers. That way you just have to include any dependencies you need in your pom's referencing this parent pom and you can leave out the versions. This ensures that all projects use the same versions of jars. You can also declare e.g. all known modules for this project like. modules module../productinformationwebapp/module module../productpreview/module module../producttransformer/module module../shared/module /modules So if you do a mvn install it will trigger a reactor build in this case. It will typically also contain any repositories used (e.g. enterprise maven repository( repositories repository idnxp-releases/id urlhttp://ecm.evelopers.com:8081/nexus/content/groups/public/url snapshotsenabledfalse/enabled/snapshots releasesenabledtrue/enabled/releases /repository repository idnxp-snapshots/id urlhttp://ecm.evelopers.com:8081/nexus/content/groups/public-snapshots/url snapshotsenabledtrue/enabled/snapshots releasesenabledfalse/enabled/releases /repository /repositories pluginRepositories pluginRepository idmycompany-releases/id url/url snapshotsenabledfalse/enabled/snapshots releasesenabledtrue/enabled/releases /pluginRepository pluginRepository idmycompany-snapshots/id url/url snapshotsenabledtrue/enabled/snapshots releasesenabledfalse/enabled/releases /pluginRepository /pluginRepositories distributionManagement repository idmycompany-releases/id url./url /repository snapshotRepository uniqueVersionfalse/uniqueVersion idmycompany-snapshots/id url./url /snapshotRepository /distributionManagement Robby -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Saturday, March 10, 2012 3:13 PM To: users@cocoon.apache.org Subject: Re: parent of parent artifact? Thanks for sharing this, Thorsten. How do your poms then all fit together? Via a parent pom? I have to draw up an architecture for a similar project: XML content is addressable via web services. (not necessarily cocoon). Cheers, Jos On 03/10/2012 01:27 AM, Thorsten Scherler wrote: major dep to the gui block which then has the deps - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
pipeline component
Hi ! Question: * a web form controls the generation of a report * the report comes as a .zip download What sitemap component should be created for this report generator? (in fact it should be a single component, like map:read) - set headers - write zip output to response.getOutputStream Thanks, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: pipeline component
Hi Francesco! I am running 3! Jos On 03/08/2012 12:20 PM, Francesco Chicchiriccò wrote: On 08/03/2012 11:44, Jos Snellings wrote: Hi ! Hi Jos: first of all, which version are you running? Question: * a web form controls the generation of a report * the report comes as a .zip download What sitemap component should be created for this report generator? (in fact it should be a single component, like map:read) - set headers - write zip output to response.getOutputStream - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: pipeline component
Thanks Robby Francesco! That been said, the use case is a bit special. In my case the sitemap would have gone involved. I did not split it up and here's what I did: public class mycomponent implements Starter, Finisher { ZipOutputStream zip_out = new ZipOutputStream(outputStream); compose and add requested entries zip_out.close(); } and just added setOutputStream() and getContentType() The question is often where you want to put the complexity. Granted, defeats a bit the purpose of a pipeline, but it works ;-) Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: How/where to create a sitemap in a generated Cocoon 3 web app?
Well, that's two of us. In fact, three, as Francesco would be willing to contribute as well. The mail is a good starting point. And then I notice a **strong** suggestion to release. Put that together and we can get this thing rolling again! Let's rock! Have a nice weekend, Jos On 03/02/2012 04:30 PM, Lars Huttar wrote: Jos, thanks for these helpful instructions! I will create a sitemap at src/main/resources/COB-INF/sitemap.xmap and see how far that gets me. I agree, it would be very helpful to have a tutorial for newbies! I'll be happy to make a contribution. Lars On 3/2/2012 12:47 AM, Jos Snellings wrote: Hi Lars, The instructions on the site are obscure because they presuppose a good deal of Maven knowledge. Maven helps you to build the project: it puts all the files you need together and at first it feels metaphysical (hey, will you let me control my own build?). But here's what I do: ThingToKnow1: the elements you want to expose, and your sitemap are in the block. Your cocoon webapp is going to mount (my word choice) the blocks on a virtual path. ThingToKnow2: You control Mavens behaviour through editing pom.xml. Add your Cocoon block as dependency means that you are going to edit the pom.xml. 1. create the webapp from the archetype. The webapp contains close to nothing. It will contain close to nothing. It should contain the canonical structure of a web project: pom.xml main main/resources main/webapp main/webapp/WEB-INF main/webapp/WEB-INF/applicationContext.xml main/webapp/WEB-INF/log4j.xml main/webapp/WEB-INF/web.xml Edit pom.xml, you will see the section dependencies. Add the dependency for the block you want to add (I said mount, but I guess that is old fashioned). dependencies dependency groupIdorg.tiaterra/groupId artifactIdmyCocoonBlock/artifactId version1.0.0-SNAPSHOT/version /dependency /dependencies 2. create your block from the archetype This will create a structure like: src src/test src/test/resources src/test/java src/main src/main/resources src/main/resources/COB-INF src/main/resources/COB-INF/javascript src/main/resources/COB-INF/xslt src/main/resources/COB-INF/images src/main/resources/COB-INF/style src/main/resources/COB-INF/style/images src/main/resources/COB-INF/static-content src/main/resources/META-INF src/main/resources/META-INF/cocoon src/main/resources/META-INF/cocoon/spring src/main/java src/main/java/org src/main/java/org/tanteterra Your site map is at: src/main/resources/COB-INF/sitemap.xmap And true, the documentation on the site does not make it easy enough to step up the threshold and upgrade. [@group: shouldn't we do something about that. Cocoon is losing its user base, it will end up getting adopted only by a few old people out there. It is gaining momentum on the planet Zork but that's not going to help us on Earth, is it?] I hope this helps you on the way. It would make me very happy to know that I am not one of the sole developers on this planet who chose cocoon 3 as a development platform, for the few times in your life that you are in the position to make this choice for your customer! I chose for cocoon 3 because I liked the new architecture. [@group: this can be the start for a tutorial for newbies, someone interested? I feel that the maven integration and the spring part deserve better explanation, they are way too arcane for starters. A tutorial could explain how to get things done without first studying two other frameworks.] Kind regards, Jos Snellings
Re: Cocoon 2.2 and OSGI
Hi Fawzib, There are certainly traces of such attempts, for instance: artifactIdcocoon-xml/artifactId version2.0.3-SNAPSHOT/version packagingbundle/packaging Anyone knows more? Jos On 03/02/2012 04:20 PM, Fawzib Rojas wrote: I have been working in Glassfish and OSGI and was wondering, did Cocoon 2.2 was ever made into an OSGI bundle? I googled some info about it and all I saw was some messages from 2005-2008 talking about it and a wiki page about experimenting with it, last edited on 2009. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: How/where to create a sitemap in a generated Cocoon 3 web app?
Hi Lars, The instructions on the site are obscure because they presuppose a good deal of Maven knowledge. Maven helps you to build the project: it puts all the files you need together and at first it feels metaphysical (hey, will you let me control my own build?). But here's what I do: ThingToKnow1: the elements you want to expose, and your sitemap are in the block. Your cocoon webapp is going to mount (my word choice) the blocks on a virtual path. ThingToKnow2: You control Mavens behaviour through editing pom.xml. Add your Cocoon block as dependency means that you are going to edit the pom.xml. 1. create the webapp from the archetype. The webapp contains close to nothing. It will contain close to nothing. It should contain the canonical structure of a web project: pom.xml main main/resources main/webapp main/webapp/WEB-INF main/webapp/WEB-INF/applicationContext.xml main/webapp/WEB-INF/log4j.xml main/webapp/WEB-INF/web.xml Edit pom.xml, you will see the section dependencies. Add the dependency for the block you want to add (I said mount, but I guess that is old fashioned). dependencies dependency groupIdorg.tiaterra/groupId artifactIdmyCocoonBlock/artifactId version1.0.0-SNAPSHOT/version /dependency /dependencies 2. create your block from the archetype This will create a structure like: src src/test src/test/resources src/test/java src/main src/main/resources src/main/resources/COB-INF src/main/resources/COB-INF/javascript src/main/resources/COB-INF/xslt src/main/resources/COB-INF/images src/main/resources/COB-INF/style src/main/resources/COB-INF/style/images src/main/resources/COB-INF/static-content src/main/resources/META-INF src/main/resources/META-INF/cocoon src/main/resources/META-INF/cocoon/spring src/main/java src/main/java/org src/main/java/org/tanteterra Your site map is at: src/main/resources/COB-INF/sitemap.xmap And true, the documentation on the site does not make it easy enough to step up the threshold and upgrade. [@group: shouldn't we do something about that. Cocoon is losing its user base, it will end up getting adopted only by a few old people out there. It is gaining momentum on the planet Zork but that's not going to help us on Earth, is it?] I hope this helps you on the way. It would make me very happy to know that I am not one of the sole developers on this planet who chose cocoon 3 as a development platform, for the few times in your life that you are in the position to make this choice for your customer! I chose for cocoon 3 because I liked the new architecture. [@group: this can be the start for a tutorial for newbies, someone interested? I feel that the maven integration and the spring part deserve better explanation, they are way too arcane for starters. A tutorial could explain how to get things done without first studying two other frameworks.] Kind regards, Jos Snellings On 03/01/2012 11:59 PM, Lars Huttar wrote: Hello, We've been Cocoon 2.1.* users for years. We're now trying to shift to the Cocoon 3 way of doing things. I barely understand Maven, but I'm willing to learn. I've installed Cocoon 3, and can run a sample. But now I'm having trouble figuring out how to build my own hello world web application. What I did so far: | svn checkout http:||//svn.apache.org/repos/asf/cocoon/cocoon3/trunk c3| cd c3 | mvn clean install cd cocoon-databases-sample mvn jetty:run | I can then access the running databases sample at http://localhost:/ in the browser. I've generated the four Maven 2 archetypes as instructed at http://cocoon.apache.org/3.0/download.html (sample, block, webapp, parent). I don't understand, though, what each one is for. For archetype-block, the instruction says Create an empty Cocoon 3 block in order to create your own Cocoon 3 web application. But once I've done that, what do I do in the generated block in order to create a web application? For archetype-webapp, it says Create an empty Java web application project. After that add your Cocoon block as dependency. I guess Cocoon block refers to the previous thing I generated. How do I add it as a dependency? I guess I should edit cocoon-archetype-webapp/pom.xml and add this before /project: dependencies dependency groupIdorg.apache.cocoon.archetype-block/groupId artifactIdcocoon-archetype-block/artifactId /dependency /dependencies For archetype-parent, the instruction says Create a parent module for your Cocoon project. Is a project the same as a web application? Does this mean I should edit the contents of parent in archetype-webapp/pom.xml to point correctly to archetype-parent? (The parent element is present already, but its groupId, artifactId, and relativePath are a bit off from what would match the parent archetype generated by the instructions.) **The main thing I want to know, though,** is where do I start building
classnotfound
Dear cocooners, When trying to load cocoon-optional, spring complains loudly about not being able to find class: org/apache/cocoon/components/serializers/util/XMLSerializer In effect, this class is not within the cocoon distribution. To my best knowledge, there is no sub project cocoon-components The problematic declaration is: public class EncodingXMLSerializer extends org.apache.cocoon.components.serializers.util.XMLSerializer implements SAXPipelineComponent, Finisher, SAXConsumer, CachingPipelineComponent { Can anybody shed some light upon this one? Thank you ! Jos
Re: tomcat 7 64 bit on Windows 2008
Hi Paul, Did you tell tomcat explicitly where it can find the file?: # export JAVA_OPTS=\ '-Djava.security.auth.login.config=/root/.java.login.config Cheers, Jos On 12/16/2011 05:06 AM, Paul Joseph wrote: Hi there, I have implemented spnego authentication in my cocoon applictaion (Tomcat 6, Windows 8 server in 32 bit mode). But when I try to run it with Tomcat 7, 64 bit on the same server, it says that it cannot find the login.conf file. It is in the same location (directly under Tomcat 7 directory) as I would have it if I were using Tomcat 6. I am not sure this is the right forum to ask this question in, and if you know the right forum, please let me know. The error I get is below, any guidance is much appreciated! paul - java.io.IOException: login.conf (No such file or directory) at com.sun.security.auth.login.ConfigFile.init(Unknown Source) at com.sun.security.auth.login.ConfigFile.init(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at javax.security.auth.login.Configuration$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.Configuration.getConfiguration(Unknown Source) at net.sourceforge.spnego.SpnegoFilterConfig.doClientModule(SpnegoFilterConfig.java:176) at net.sourceforge.spnego.SpnegoFilterConfig.init(SpnegoFilterConfig.java:138) at net.sourceforge.spnego.SpnegoFilterConfig.getInstance(SpnegoFilterConfig.java:314) at net.sourceforge.spnego.SpnegoAuthenticator.init(SpnegoAuthenticator.java:206) at org.apache.cocoon.ojb.samples.bean.SpnegoCocoonAuthenticator.act(SpnegoCocoonAuthenticator.java:97) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:125) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) at
Re: N00b - But please help - Cocoon syndication/proxy
Could you please be a little bit more specific about the desired behaviour of your application? For instance, on the basis of what do you want to redirect pages? You can do such things with cocoon, but maybe it is not the best choice. Depending on details. Best, Jos On 07/01/2011 07:12 PM, Luke The Man wrote: I am totally new to cocoon, and while I get the architecture, I am struggling wading through the various disparate doc elements to figure out what I think would be a simple task. I want to use my cocoon instance like a syndication or proxy. I know there is a syndication example, but it does not have the complete sitemap in it and it skims over some issues I am not getting. Plus it is based on using web service calls, and all I want to do is redirect web calls, get the page and do some parsing on it. Can anyone help me with this? - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: HttpServletRequest from Flowscript
Well, that seems indeed like a rather complex way to achieve a simple thing. How about this: - 2.1 still has a horse called xsp, which is a scripting language ensuring nicely balanced tags. Like an xml-ized jsp. an xsp page has direct access to request data, and you have access to pages. I can send you an example. - in 3 there is no xsp anymore (it got accused of witchcraft or so ;-) ). Cheers, Jos On 06/13/2011 12:12 PM, Paul Joseph wrote: Hi Jos, Thank your for your reply--I am using that old workhourse, Cocoon 2.1 (.11) I find that there it appears to be not that simple at all. I use flowscript and Java and am trying to implement Windows Single SIgn On with SPNEGO. The issue is that it needs HttpServletRequest while all I have in the flowscript is cocoon.request which is not the same. I found the following method on the web. a) get the application context (avalon) public void contextualize(Context context) throws ContextException { objectModel = ContextHelper.getObjectModel(context); } b) then with the objectModel, we can do: final HttpServletRequest httpRequest = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT); Good...but my problem is simple and after many hours I still don't know how to do this: How does one access the Avalon context in Javascript and then pass it to the Java layer? Now after much reading I find that I should probably write an Action and use the sitemap to fire the action. I gather the sitemap will automatically make the objectmodel available to my action code and then I can proceed as in step b above. My only problem is I have never written or used an action and so am a bit wary. rgds Paul On 6/13/2011 12:00 AM, Jos Snellings wrote: Hi Paul, C3 or C2.2? In cocoon-3 you may want to use: import org.apache.cocoon.servlet.util.HttpContextHelper; HttpServletRequest request; public void setup(MapString, Object parameters) { request = HttpContextHelper.getRequest(parameters); } from within a cocoon generator. Cheers, Jos On 06/12/2011 07:01 PM, Paul Joseph wrote: Hi there, Does anyone know how one can pass the Cocoon request to a java function that needs to use HttpServletRequest? I passed in the cocoon.request to the Java function using but inside the Java code I am not able to cast the cocoon request to the HttpServletRequest. Any guidance would be appreciated. Paul - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: HttpServletRequest from Flowscript
Hi Paul, C3 or C2.2? In cocoon-3 you may want to use: import org.apache.cocoon.servlet.util.HttpContextHelper; HttpServletRequest request; public void setup(MapString, Object parameters) { request = HttpContextHelper.getRequest(parameters); } from within a cocoon generator. Cheers, Jos On 06/12/2011 07:01 PM, Paul Joseph wrote: Hi there, Does anyone know how one can pass the Cocoon request to a java function that needs to use HttpServletRequest? I passed in the cocoon.request to the Java function using but inside the Java code I am not able to cast the cocoon request to the HttpServletRequest. Any guidance would be appreciated. Paul - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: sitemap
To reply again (with the some delay ...): No, the old {request:serverName} does not work anymore in 3. The new syntax is: servlet:redirect-to uri=http://{jexl:cocoon.request.serverName}/herein/thesaurus/editor/workspace/ Same with the other request attributes. This is not documented, nor to be found in the examples. Hence this mail. Not too difficult to guess, though! Any plans to release cocoon 3? Is cocoon-3 like the never ending Bob Dylan tour? Best regards, Jos On 01/20/2011 06:22 PM, Laurent Medioni wrote: Hello, The old uri={request:scheme}://{request:serverName}:{request:serverPort}{reques t:contextPath}/secure/loginpage Using org.apache.cocoon.components.modules.input.RequestModule does not work anymore in 3 ? Laurent -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: jeudi 20 janvier 2011 14:07 To: users@cocoon.apache.org Subject: sitemap Hello, Cocoon 3: Is there an expression for the servername in the sitemap? I am looking for: map:handle-errors map:select value={jexl:cocoon.exception.class.name} map:when contains=NoMatchingPipelineException map:generate src=error-handling/404.xml / map:serialize type=xhtml status-code=404 / /map:when map:when ends-with=AnonymousAccessException servlet:redirect-to uri=https://{server}/myapplication/secure/loginpage; / /map:when Thanks! Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
sitemap
Hello, Cocoon 3: Is there an expression for the servername in the sitemap? I am looking for: map:handle-errors map:select value={jexl:cocoon.exception.class.name} map:when contains=NoMatchingPipelineException map:generate src=error-handling/404.xml / map:serialize type=xhtml status-code=404 / /map:when map:when ends-with=AnonymousAccessException servlet:redirect-to uri=https://{server}/myapplication/secure/loginpage; / /map:when Thanks! Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Flash .swf in Cocoon 2.1.11
Hi Peter, Your page is ok, the element says movie not loaded. It looks to me like your problem is not cocoon related. I have a similar flash on a site. It has the parameter play. Here is a sample: (classid not right). OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0WIDTH=460HEIGHT=345; PARAM NAME=movieVALUE=images/plan-de-pistes-bernex-v3.swf PARAM NAME=qualityVALUE=high PARAM NAME=bgcolorVALUE=#FF PARAM NAME=playvalue=true EMBED src=images/plan-de-pistes-bernex-v3.swf view-source:http://european-heritage.coe.int/sdx/herein/national_heritage/flash/carte_europe_np.swf?langue=enlien=choose_country.xspquality=highbgcolor=#FFWIDTH=460HEIGHT=345TYPE=application/x-shockwave-flashPLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash;/EMBED/OBJECT Hope it helps. Jos On 12/07/2010 04:22 PM, Peter Sparkes wrote: Thanks Jasha, The html page displays correctly, except that the .swf file is not displayed, see http://www.chezmuta.com/flashTest.htm. However, http://www.chezmuta.com/images/plan-de-pistes-bernex-v3.swf displays the .swf correctly. The browser source page for flashTest.htm appears correct. In my sitemap.xmap file I have map:match pattern=images/*.swf map:read mime-type=application/x-shockwave-flash src=resources/images/{1}.swf/ /map:match Regards Peter On 7 December 2010 13:49, Peter Sparkes pe...@didm.co.uk mailto:pe...@didm.co.uk wrote: Hi, I am trying, without success, to display a flash .swf files using Cocoon 2.1.11 Help please Peter What's the problem? Is it the HTML or do you see 404-not found responses for certain resources that have anything to do with the swf? Providing more information leads more likely to a solution ;) Jasha Joachimsthal j.joachimst...@onehippo.com mailto:j.joachimst...@onehippo.com - ja...@apache.org mailto:ja...@apache.org Hippo Europe • Amsterdam Oosteinde 11 • 1017 WT Amsterdam • +31 (0)20 522 4466 USA • San Francisco 755 Baywood Drive Second Floor • Petaluma CA 94954 • +1 877 414 4776 (toll free) Canada • Montréal 5369 Boulevard St-Laurent #430 • Montréal QC H2T 1S5 • +1 (514) 316 8966 www.onehippo.com http://www.onehippo.com/ • www.onehippo.org http://www.onehippo.org/ • i...@onehippo.com mailto:i...@onehippo.com
Re: HTML5 doctype from Cocoon 2.1?
Hi Martin, Do not know details, but it might help if you use the xsl:output element in your transformation. There is hope that it would not be overridden by the serializer. xsl:output method=xml|html|text|name version=string encoding=string omit-xml-declaration=yes|no standalone=yes|no doctype-public=string doctype-system=string cdata-section-elements=namelist indent=yes|no media-type=string/ Cheers, Jos On 11/12/2010 05:17 PM, Martin Holmes wrote: Hi there, Does anyone know how to configure a serializer for Cocoon 2.1 that will output an HTML5 document? That means a minimal doctype that looks like this: !DOCTYPE html served as text/html. Cheers, Martin - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: AW: [C2.2] Fop Performance Issue with large documents
Off-line would be: with fop.bat, generating static files. The alternative is more expensive: write a cocoon serializer based on iText. But is that a guarantee for absolutely big performance? not sure. just a good guess. XSLT transformations may well defeat the purpose of using SAX, as they hold a lot of context in memory, Maybe somebody out there has hands-on experience? Hell. Some good advice here? Cheers, Jos On 11/15/2010 08:02 AM, Matthias Müller wrote: Thanks for replying. We use Cocoon online to serve (10) coworkers. What do you mean with off-line preparation? I heard about the good performance of iText. Since we do only xml processing i need a way to apply xsl:fo stylesheet and afaik there is no xsl fo renderer for iText. Matthias - Ursprüngliche Mail Von: Jos Snellingsjos.snelli...@pandora.be An: users@cocoon.apache.org Gesendet: Freitag, den 12. November 2010, 14:45:20 Uhr Betreff: Re: [C2.2] Fop Performance Issue with large documents Hi Matthias, Do you want to do that on line? Is off-line preparation a possibility? As an alternative to FOP you could try iText which is completely procedural if you want! Jos On 11/12/2010 11:16 AM, Matthias Müller wrote: Hi there, i ran into massive performance problems using Fop serializing large FO files (PDFs with 500+ pages). It takes up to 30 minutes for a single PDF and needs a lot of memory and cpu power. If i do the processing locally (no Cocoon but fop.bat), it takes about 2 minutes. I know that FOP is not performant with large documents, but i only face that when running inside Cocoon. Is this a configuration issue? Are there alternatives to FOP/Cocoon? How do you process large xml based documents to pdf? At the moment i still use Fop 0.20.5, what about the performance with Fop 1.0? Matthias - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: [C2.2] Fop Performance Issue with large documents
Hi Matthias, Do you want to do that on line? Is off-line preparation a possibility? As an alternative to FOP you could try iText which is completely procedural if you want! Jos On 11/12/2010 11:16 AM, Matthias Müller wrote: Hi there, i ran into massive performance problems using Fop serializing large FO files (PDFs with 500+ pages). It takes up to 30 minutes for a single PDF and needs a lot of memory and cpu power. If i do the processing locally (no Cocoon but fop.bat), it takes about 2 minutes. I know that FOP is not performant with large documents, but i only face that when running inside Cocoon. Is this a configuration issue? Are there alternatives to FOP/Cocoon? How do you process large xml based documents to pdf? At the moment i still use Fop 0.20.5, what about the performance with Fop 1.0? Matthias - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: [Cocoon+OAI]
Hi Marco, You are looking for scheduled harvesting and storage, whether you save the harvest in xml or not. Cocoon is more about the presentation/transformation of xml. Maybe this brings you closer : The Digital Commonwealth http://www.digitalcommonwealth.org/ uses a solr based OAI-PMH engine to search digital collections within Massachusetts The SDX project is based upon cocoon, and gets serious about OAI as well: http://www.nongnu.org/sdx/docs/html/doc-sdx2/en/index.html Cheers, Jos On 10/15/2010 01:35 PM, Marco BÜCHLER wrote: Hi, I'm currently preparing a proposal in the context of Digital Libraries and Open Access. In this context: Does an implementation such as a block exist for an OAI web interface? Since Cocoon is an XML based web publishing framework, I would expect this but I could not found something available in the internet. Thanks for any help, Cheers, Marco - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: [C3] How to/where to disable certificate check accessing HTTPS
Hi Andrej, Could you please provide a little bit more detail on what you want to accomplish? Is it that you need in your sitemap to forward some urls to a secure site? Cheers, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Problem using XSP pages
Hi, Shweta, Please tell us first which version cocoon you deployed. Is that 2.2? Cheers, Jos On 09/07/2010 07:46 AM, Shweta Singhai wrote: Hi All, This is Shweta, I am new in cocoon, I configured cocoon block with maven server ..and also with ant. For a simple block its working properly, but when I create a xsp file and try to run same as simple xml file , then its not working, can any one tell me, is there any special setting or configuration require for xsp pages...?? Please help me in run and configuration of xsp pages. Shweta Singhai Technical Analyst Ictect, Inc. shweta.sing...@ictect.com The IMPOSSIBLE is often UNTRIED
Re: Problem using XSP pages
OK, what further details have you got for us? - logs? is something actually happening, going wrong? - or do you see no trace of activity at all? - what is in your sitemap.xmap? Cheers, Jos On 09/07/2010 08:34 AM, Shweta Singhai wrote: Hi Jos, Yes its cocoon 2.2 *From:* Jos Snellings [mailto:jos.snelli...@pandora.be] *Sent:* Tuesday, September 07, 2010 12:02 PM *To:* users@cocoon.apache.org *Subject:* Re: Problem using XSP pages Hi, Shweta, Please tell us first which version cocoon you deployed. Is that 2.2? Cheers, Jos On 09/07/2010 07:46 AM, Shweta Singhai wrote: Hi All, This is Shweta, I am new in cocoon, I configured cocoon block with maven server ..and also with ant. For a simple block its working properly, but when I create a xsp file and try to run same as simple xml file , then its not working, can any one tell me, is there any special setting or configuration require for xsp pages...?? Please help me in run and configuration of xsp pages. Shweta Singhai Technical Analyst Ictect, Inc. shweta.sing...@ictect.com The IMPOSSIBLE is often UNTRIED
Re: XSLT document(), logging URI resolver
Hi Lars, I would say that the reference URI is the one of the xslt script itself. So putting the document to fetch in the same directory should help. A common problem is that there is uri-wise nothing to fetch: if you use a relative URI, this would hide the fact that the protocol is http; if you recompose the absolute URL from there, would there be a way that the document would make it through the pipeline definitions in your sitemap? Cheers, Jos On 06/29/2010 04:20 PM, Lars Huttar wrote: Hello, I'm wrestling with the following in Cocoon 2.1.11. I have an XSLT that uses document() to retrieve a source document other than the one coming through the pipeline. I remember that the use of document() isn't encouraged in Cocoon, at least because Cocoon then doesn't know when to invalidate the cache for that pipeline. However, I don't have much choice in this case... the XSLT is someone else's. (It's the common XSLT implementation of Schematron, and I'd rather not modify it any more than I have to, because then upgrading it will be difficult.) When I run this stylesheet, the document() call is apparently retrieving nothing. The argument to document() is a relative URI. So I figure that between the base URI that is being used, and the relative URI (which is a simple filename.sch), the result is not a URI than Cocoon is able to resolve to the right file. According to the XSLT spec, the base URI should be either the input document or the stylesheet, depending on where the relative URI comes from. I believe it is considered to come from the input document in my case. However I don't know what the XSLT processor considers to be the URI of its input document. I think if I could turn on verbose logging of the URI resolver, I could find out what the XSLT processor thinks is the base URI, and then maybe fix the problem. But I can't get that to happen. Btw I've tried this with both xalan and Saxon for the XSLT processor. I'm looking at http://wiki.apache.org/cocoon/ConfiguringTheLogs and http://wiki.apache.org/cocoon/UnderstandingCocoonLogging and I added a resolver target to logkit.xconf, and a category to send core.resolver messages to resolver.log file. That works, for URLs processed by the sitemap: The file WEB-INF/logs/resolver.log appears and has content. But there is no message for the xsl:include processed internally to the XSLT. Maybe this is a Saxon / Xalan issue rather than a Cocoon issue. But the xsl:include works fine outside of Cocoon, e.g. in Oxygen. Granted, in that case I know what the URL of the input document is; it's a file URL. And the relative URL in the xsl:include works relative to the file URL of the input document. Surprisingly, even when I gave xsl:include an absolute URL, e.g. http://localhost:8080/mount/...;, the document() statement seems to still fetch nothing. This URL works fine in the browser (same machine). So this would suggest that the base URL of the input document is not the whole problem. Can anybody suggest how to debug this? Thanks, Lars
Re: how-to use xml catalog with apache cocoon 2.2
Hi Robby, I have in cocoon.xconf: parameter name=catalog value=/resources/entities/catalog/^M However, it is probably desirable to leave this default catalog config and declare your own local catalogs, which are loaded in addition to the system catalog. There are various ways to do local configuration (see Entity Catalogs documentation). One way is via the CatalogManager.properties file. As an additional method, you can specify the local-catalog parameter here. local-catalog: The full filesystem pathname to a single local catalog file.^M parameter name=local-catalog value=/usr/local/sgml/mycatalog/ verbosity: The level of messages for status/debug (messages go to standard output)^M The following messages are provided ...^M 0 = none^M 1 = ? (... not sure yet)^M 2 = 1+, Loading catalog, Resolved public, Resolved system^M 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem^M 10 = 3+, List all catalog entries when loading a catalog^M (Cocoon also logs the Resolved public messages.) ^M TODO: determine all messages at each level^M parameter name=verbosity value=2/^M In addition, under webapp/WEB-INF/classes, there is CatalogManager.properties, it looks like: - verbosity=1 # default # from webapps/cocoon/resources/entities/catalog^ # use full pathnames^M # pathname separator is always semi-colon (;) regardless of operating system^M # directory separator is always slash (/) regardless of operating system^M #^M #catalogs=/path/to/local/catalog catalogs=/usr/local/catalina/webapps/sdx/herein.catalog prefer=public static-catalog=yes allow-oasis-xml-catalog-pi=yes And my catalog is in the web root of the application. Hope this helps, Jos On Tue, 2010-05-25 at 12:14 +0200, Robby Pelssers wrote: Hi all, Just wondering if we have some online documentation explaining how to configure Cocoon for using xml catalogs. Kind regards, Robby - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: Very large Generator file
A SAX pipeline is part of cocoon. Can you explain briefly what you want to do? Consider using a cocoon-3 pipeline. Consider using a SAX transformation: - read xml - do something with it (transforming, for instance) - write output to a file Jos On Mon, 2010-05-10 at 08:23 -0500, Schmitz, Jeffrey A wrote: Correct, it's not being turned into a web page. Is a SAX pipeline part of Cocoon? I'm still on Cocoon 2.1, but I've never heard that term specifically, I thought the default generator did use SAX. -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Saturday, May 08, 2010 12:06 AM To: users@cocoon.apache.org Subject: Re: Very large Generator file Hi Jeff, That depends a great deal on what you want to do exactly with the large file. I guess you do not want to transform it into one huge web page? In general, if you have to deal with lengthy inputs, a SAX pipeline is the way to go. Jos On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote: Hello, I was wondering if there’s a way to handle very large files as inputs to the default cocoon generator? As it is, I am getting a memory heap error when trying to process an input file because it’s so large. Am I going to have to process it in some other manner, or is there a way to make Cocoon perform the transform for me? Thanks, Jeff - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: Very large Generator file
Hi Jeff, If you have been trying giving all the available memory to your tomcat instance (JVM options) you are at the end of you tether for the current solutions, unless somebody has a different idea. I understood from your previous mail that the resulting xhtml is not for on-line use, it is a sort of report/summary. If this is the case a short java program can make that xhtml file for you. Cheers, Jos On Mon, 2010-05-10 at 09:17 -0500, Schmitz, Jeffrey A wrote: Hi Jos, I've already written my own Transformer (extends AbstractSAXTransformer) that currently takes the output of the default cocoon xsl transformer (via the sitemap) and performs subsequent, non-xsl transforms, writes the results to file and generates the returned web-page e.g. map:match pattern=*/*/*In/*/*In.flow/* map:generate src=inputs/{4} / map:transform src=xsl/{3}InAdapter.xsl map:parameter name=instanceName value={2}/ /map:transform map:transform type=SPARQLinTrans map:parameter name=inputFile value={4}/ map:parameter name=SPARQLFlow value={5}/ /map:transform map:serialize type=xhtml/ /map:match I'm currently heading in the direction of just adding the initial xsl transformation as part of my own Transformer's duties (I think your option 3) so that it can hopefully handle the larger files, but I was wondering if there might be a way to easily keep things as they are and continue using the default cocoon xsl tranform as the first step. Sounds like there's not? -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Monday, May 10, 2010 8:39 AM To: users@cocoon.apache.org Subject: RE: Very large Generator file A SAX pipeline is part of cocoon. Can you explain briefly what you want to do? Consider using a cocoon-3 pipeline. Consider using a SAX transformation: - read xml - do something with it (transforming, for instance) - write output to a file Jos On Mon, 2010-05-10 at 08:23 -0500, Schmitz, Jeffrey A wrote: Correct, it's not being turned into a web page. Is a SAX pipeline part of Cocoon? I'm still on Cocoon 2.1, but I've never heard that term specifically, I thought the default generator did use SAX. -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Saturday, May 08, 2010 12:06 AM To: users@cocoon.apache.org Subject: Re: Very large Generator file Hi Jeff, That depends a great deal on what you want to do exactly with the large file. I guess you do not want to transform it into one huge web page? In general, if you have to deal with lengthy inputs, a SAX pipeline is the way to go. Jos On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote: Hello, I was wondering if there’s a way to handle very large files as inputs to the default cocoon generator? As it is, I am getting a memory heap error when trying to process an input file because it’s so large. Am I going to have to process it in some other manner, or is there a way to make Cocoon perform the transform for me? Thanks, Jeff --- -- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: Very large Generator file
Yes, Jeff, my guess is that the tfactory stuff will accomplish the job for you without complaining about memory shortage! Your tomcat instance may have other things around increasing the memory footprint all the time. On Mon, 2010-05-10 at 09:43 -0500, Schmitz, Jeffrey A wrote: Yes, the resulting XHTML file is not for online use. And yes, I've given max memory to the tomcat instance. So, will having my specialized transformer do the xsl transform directly using a SAX transformer not work either? e.g. something like: TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer transformer = tfactory.newTransformer(new StreamSource( xslID)); transformer.transform(new StreamSource(sourceFile), new StreamResult( new File(modelFile))); I guess I was under the impression that SAX based xsl transformers didn't use much memory regardless file size, but perhaps that's not true? If that's not going to work, would moving to a 64 bit machine so I can give more memory to Tomcat be an option (is there a 64 bit Tomcat)? If this is the case a short java program can make that xhtml file for you. I'm not exactly sure what you're suggesting here. Do you mean for the tomcat/cocoon process to exec a separate java program that will do the xsl transform on the large file? Won't any java program come up against the 2 Gig max memory limitation? Thanks, Jeff -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Monday, May 10, 2010 9:30 AM To: users@cocoon.apache.org Subject: RE: Very large Generator file Hi Jeff, If you have been trying giving all the available memory to your tomcat instance (JVM options) you are at the end of you tether for the current solutions, unless somebody has a different idea. I understood from your previous mail that the resulting xhtml is not for on-line use, it is a sort of report/summary. If this is the case a short java program can make that xhtml file for you. Cheers, Jos On Mon, 2010-05-10 at 09:17 -0500, Schmitz, Jeffrey A wrote: Hi Jos, I've already written my own Transformer (extends AbstractSAXTransformer) that currently takes the output of the default cocoon xsl transformer (via the sitemap) and performs subsequent, non- xsl transforms, writes the results to file and generates the returned web-page e.g. map:match pattern=*/*/*In/*/*In.flow/* map:generate src=inputs/{4} / map:transform src=xsl/{3}InAdapter.xsl map:parameter name=instanceName value={2}/ /map:transform map:transform type=SPARQLinTrans map:parameter name=inputFile value={4}/ map:parameter name=SPARQLFlow value={5}/ /map:transform map:serialize type=xhtml/ /map:match I'm currently heading in the direction of just adding the initial xsl transformation as part of my own Transformer's duties (I think your option 3) so that it can hopefully handle the larger files, but I was wondering if there might be a way to easily keep things as they are and continue using the default cocoon xsl tranform as the first step. Sounds like there's not? -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Monday, May 10, 2010 8:39 AM To: users@cocoon.apache.org Subject: RE: Very large Generator file A SAX pipeline is part of cocoon. Can you explain briefly what you want to do? Consider using a cocoon-3 pipeline. Consider using a SAX transformation: - read xml - do something with it (transforming, for instance) - write output to a file Jos On Mon, 2010-05-10 at 08:23 -0500, Schmitz, Jeffrey A wrote: Correct, it's not being turned into a web page. Is a SAX pipeline part of Cocoon? I'm still on Cocoon 2.1, but I've never heard that term specifically, I thought the default generator did use SAX. -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Saturday, May 08, 2010 12:06 AM To: users@cocoon.apache.org Subject: Re: Very large Generator file Hi Jeff, That depends a great deal on what you want to do exactly with the large file. I guess you do not want to transform it into one huge web page? In general, if you have to deal with lengthy inputs, a SAX pipeline is the way to go. Jos On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote: Hello, I was wondering if there’s a way to handle very large files as inputs to the default cocoon generator? As it is, I am getting a memory heap error when trying to process an input file because it’s so
Re: Very large Generator file
Hi Jeff, That depends a great deal on what you want to do exactly with the large file. I guess you do not want to transform it into one huge web page? In general, if you have to deal with lengthy inputs, a SAX pipeline is the way to go. Jos On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote: Hello, I was wondering if there’s a way to handle very large files as inputs to the default cocoon generator? As it is, I am getting a memory heap error when trying to process an input file because it’s so large. Am I going to have to process it in some other manner, or is there a way to make Cocoon perform the transform for me? Thanks, Jeff - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: is possible to use jquery in coccon
This is rather a question for cocoon users. Your answer: Yes it is! It is something that is fundamentally possible, but I suggest you keep the bulk of your script in separate files, as constructs like $(#my_id).val('xsl:value-of select=@some_attribute/'); tend to cater for poor readability. You may want to organise all your javascripts and static resources in one pipeline. Cheers, Jos On Fri, 2010-04-30 at 05:37 -0700, neotello wrote: i am new in cocoon my question is possibly stupid, but i not found the response in google... is possible to use jquery's elements in cocoon?? thank... - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Bug in Cocoon-Caching?
This was not a bug. I observed that caching pipelines produce this only if they end in an XML serialization. This behaviour was strange and misleading. However, the cause was the 'cacheKey' the generator returned was the simpleCacheKey which had been sitting there from the examples. Replacing SimpleCacheKey by ParameterCacheKey solved the problem. Have a look at the routine! Maybe this removes your problem. I suggested to replace this in the examples. Hope this helps, Jos On Mon, 2010-03-22 at 21:33 +0100, Johannes Lichtenberger wrote: I think it could be related to the bug Jos Snellings posted some time ago where always the first execution in pipeline with type=xml serializers is beeing executed. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: use cocoon framework to manage static content
Hi Sumit, If I understand your story well, you are facing a rapid publication problem. The marketing department delivers data not in XML format. I do not see directy a great added value in bringing cocoon in the scheme. My suggestion is to check out some web content management productivity tool. Consider: - Drupal - Joomla With wich you could address the marketing department questions sweetly. Some other people in this group may have other/better/pure java suggestions. Cheers, Jos On Wed, 2010-03-17 at 15:14 +0530, Sumit Saini wrote: Hi All, I am new to cocoon and want to use this framework for my web application . I am developing a web application using Spring/Hibernate frameworks. My application is going to be a public facing application. The pages on this application can be divided into categories. Pre-login Post login. Pre-Login pages: These are mainly going to be marketing/user education pages. These are HTMLs/Jsps with el tags. Post-Login pages: These are main application pages which are pure JSPs with EL tags. Since app has been launched, marketing team puts pressure on us to change the content on the pre-login pages on almost daily basis. Currently, we are handling this by sending the static files to the remote static server. I want to streamline this process. The above one is tedious for changing the content as presentation is mixed with content. Often this results in errors reworks. Can I make use of Cocoon or some other XML based approach to address this issue? I want, at least for static pages, to keep the presentation code on static pages separate from content. This can enable the marketing team to write content in simple text files, which eventually can be uploaded to the server. Please suggest how can I achieve this using cocoon. I wish for following: A simple text file upload and then on the basis of EL tags on the JSPs, content gets reflected on the pages of the running application. Rgds Sumit - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: [jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
Yes, Reinhard, I agree very much with the observation that everything that influences the output must go in the cache key. OK, I use the user group again, because I am convinced that this will be of use to the whole cocoon community: here I go. I write a cocoon Generator. It extends AbstractSAXGenerator and implements CachingPipelineComponent. In order to make good use of the caching mechanism, we use a ParameterCacheKey, whereby we will use the request parameters to construct the cache key. This makes sense. Consider the methods setup() and constructCacheKey: public void setup(MapString, Object parameters) { request = HttpContextHelper.getRequest(parameters); session = request.getSession(true); } and public CacheKey constructCacheKey() { if (request == null) { System.out.println(Sapperment: request is null when constructCacheKey is called...); } MapString,String parameters = request.getParameterMap(); ParameterCacheKey cacheKey = new ParameterCacheKey(parameters); return cacheKey; } It is observed now that constructCachekey is called before setup is. :-( What to do? Let's find a way and put it as recommended practice, for this will affect virtually any future cocoon app. Ideas? Jos Reinhard Poetz commented on COCOON3-53: --- The cache key has to contain everything that influences the output produced by the generator. I have no idea why HTML serialization makes a difference, but again, the logs should give you some hints. Cocoon 3: XMLSerializer caches all -- Key: COCOON3-53 URL: https://issues.apache.org/jira/browse/COCOON3-53 Project: Cocoon 3 Issue Type: Bug Components: cocoon-pipeline Reporter: Jos Snellings After startup, any pipeline/matcher ending in an xml-serializer will produce the output of the first request after server startup, regardless of the url, let alone parameters. So the first xml pipe that is activated produces the expected output. All subsequent calls will echo that output, whatever the url or parameters. It takes a server restart to make a pipeline ending in an xml serializer work again. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
HOLD PREVIOUS MESSAGE
Please put this message on hold. I might have expressed myself in haste. First I need to perform another test! Jos On Tue, 2010-03-09 at 13:17 +0100, Jos Snellings wrote: Yes, Reinhard, I agree very much with the observation that everything that influences the output must go in the cache key. OK, I use the user group again, because I am convinced that this will be of use to the whole cocoon community: here I go. I write a cocoon Generator. It extends AbstractSAXGenerator and implements CachingPipelineComponent. In order to make good use of the caching mechanism, we use a ParameterCacheKey, whereby we will use the request parameters to construct the cache key. This makes sense. Consider the methods setup() and constructCacheKey: public void setup(MapString, Object parameters) { request = HttpContextHelper.getRequest(parameters); session = request.getSession(true); } and public CacheKey constructCacheKey() { if (request == null) { System.out.println(Sapperment: request is null when constructCacheKey is called...); } MapString,String parameters = request.getParameterMap(); ParameterCacheKey cacheKey = new ParameterCacheKey(parameters); return cacheKey; } It is observed now that constructCachekey is called before setup is. :-( What to do? Let's find a way and put it as recommended practice, for this will affect virtually any future cocoon app. Ideas? Jos Reinhard Poetz commented on COCOON3-53: --- The cache key has to contain everything that influences the output produced by the generator. I have no idea why HTML serialization makes a difference, but again, the logs should give you some hints. Cocoon 3: XMLSerializer caches all -- Key: COCOON3-53 URL: https://issues.apache.org/jira/browse/COCOON3-53 Project: Cocoon 3 Issue Type: Bug Components: cocoon-pipeline Reporter: Jos Snellings After startup, any pipeline/matcher ending in an xml-serializer will produce the output of the first request after server startup, regardless of the url, let alone parameters. So the first xml pipe that is activated produces the expected output. All subsequent calls will echo that output, whatever the url or parameters. It takes a server restart to make a pipeline ending in an xml serializer work again. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
ParameterCacheKey for a Generator.
It is herewith confirmed that pipelinecompont.setup() is called before constructCacheKey! (see CachingPipeline.setup(). The nullpointerexception I observed stemmed from a class inheritance (forgot super.setup() in one of the participating generators). Cheers, Jos On Tue, 2010-03-09 at 13:25 +0100, Jos Snellings wrote: Please put this message on hold. I might have expressed myself in haste. First I need to perform another test! Jos On Tue, 2010-03-09 at 13:17 +0100, Jos Snellings wrote: Yes, Reinhard, I agree very much with the observation that everything that influences the output must go in the cache key. OK, I use the user group again, because I am convinced that this will be of use to the whole cocoon community: here I go. I write a cocoon Generator. It extends AbstractSAXGenerator and implements CachingPipelineComponent. In order to make good use of the caching mechanism, we use a ParameterCacheKey, whereby we will use the request parameters to construct the cache key. This makes sense. Consider the methods setup() and constructCacheKey: public void setup(MapString, Object parameters) { request = HttpContextHelper.getRequest(parameters); session = request.getSession(true); } and public CacheKey constructCacheKey() { if (request == null) { System.out.println(Sapperment: request is null when constructCacheKey is called...); } MapString,String parameters = request.getParameterMap(); ParameterCacheKey cacheKey = new ParameterCacheKey(parameters); return cacheKey; } It is observed now that constructCachekey is called before setup is. :-( What to do? Let's find a way and put it as recommended practice, for this will affect virtually any future cocoon app. Ideas? Jos Reinhard Poetz commented on COCOON3-53: --- The cache key has to contain everything that influences the output produced by the generator. I have no idea why HTML serialization makes a difference, but again, the logs should give you some hints. Cocoon 3: XMLSerializer caches all -- Key: COCOON3-53 URL: https://issues.apache.org/jira/browse/COCOON3-53 Project: Cocoon 3 Issue Type: Bug Components: cocoon-pipeline Reporter: Jos Snellings After startup, any pipeline/matcher ending in an xml-serializer will produce the output of the first request after server startup, regardless of the url, let alone parameters. So the first xml pipe that is activated produces the expected output. All subsequent calls will echo that output, whatever the url or parameters. It takes a server restart to make a pipeline ending in an xml serializer work again. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Cocoon 3 XML serializer
After a complete rebuild this error has been confirmed: caching for xml serializer works way too 'well': after startup, any pipeline/matcher ending in an xml-serializer will produce the same output, regardless of the url, let alone parameters. I will create a JIRA issue and see what I can do. Cheers, Jos On Thu, 2010-03-04 at 09:36 +0100, Jos Snellings wrote: I have just checked out revision 918886. As my version was a bit out of date, in order to limit the increase in enthropy, I will make a build and report back if the problem persist. If so I create a Jira issue. Cheers, Jos On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hi, Is the hereunder described issue with XML serializers known? A sitemap having several xml serialization patterns: map:pipeline map:match pattern=showterm.xml map:generate type=term/ map:serialize type=xml/ /map:match map:match pattern=hierarchies map:generate type=topterms/ map:serialize type=xml / /map:match ... This pipeline is observed to have an 'eternal cache': whichever pattern is matched first gives the correct answer. All subsequent requests, whatever the URL, whatever the get-parameters return the contents of the cache. In order to get fresh results you need to destroy the caching stuff under work/... first. Is this known? I may as well get rid of it by checking out the very last cocoon-3 version! Just asking. Could you create a JIRA issue please and attach a failing sample please? Also add the version of C3 (release or SVN revision) that you use. Thanks! - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Writing generator / Cocoon3 alpha
Johannes, you need one or two things beside the code of the generator. - first, how is it invoked? Can you send the fragment of your sitemap.xmap that matches an url supposed to invoke this generator? - second, is there a line in sitemap-components that defines this generator? Best, Jos On Sat, 2010-03-06 at 03:40 +0100, Johannes Lichtenberger wrote: Hi, I've got a (maybe rather simple) problem, but somehow the exectute()-method isn't going to be invoked. I can see, that my generator is, because I simply created a static-Block with a sysout statement. But /** * {...@inheritdoc} */ public void execute() { try { System.out.println(blaa); ... blaa isn't printed on STDOUT :-/ (Jap, I know, I'll use the logger for further debugging ;-) Do you have any idea? The definition of the class is: public class SAXGenerator extends AbstractSAXGenerator implements CachingPipelineComponent greetings, Johannes p.s.: I wonder why you have abstract classes which define nothing at all like AbstractSAXGenerator and AbstractSAXPipelineComponent. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Cocoon 3 XML serializer
I have just checked out revision 918886. As my version was a bit out of date, in order to limit the increase in enthropy, I will make a build and report back if the problem persist. If so I create a Jira issue. Cheers, Jos On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hi, Is the hereunder described issue with XML serializers known? A sitemap having several xml serialization patterns: map:pipeline map:match pattern=showterm.xml map:generate type=term/ map:serialize type=xml/ /map:match map:match pattern=hierarchies map:generate type=topterms/ map:serialize type=xml / /map:match ... This pipeline is observed to have an 'eternal cache': whichever pattern is matched first gives the correct answer. All subsequent requests, whatever the URL, whatever the get-parameters return the contents of the cache. In order to get fresh results you need to destroy the caching stuff under work/... first. Is this known? I may as well get rid of it by checking out the very last cocoon-3 version! Just asking. Could you create a JIRA issue please and attach a failing sample please? Also add the version of C3 (release or SVN revision) that you use. Thanks! - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Cocoon 3 XML serializer
Hi! In the full checkout of the cocoon-3 SVN repository I am missing: org.apache.cocoon.sax.xpointer.XPointerFrameworkParser; org.apache.cocoon.sax.xpointer.ParseException; This prevents XIncludeTransformer from compiling. Any idea why? Jos On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hi, Is the hereunder described issue with XML serializers known? A sitemap having several xml serialization patterns: map:pipeline map:match pattern=showterm.xml map:generate type=term/ map:serialize type=xml/ /map:match map:match pattern=hierarchies map:generate type=topterms/ map:serialize type=xml / /map:match ... This pipeline is observed to have an 'eternal cache': whichever pattern is matched first gives the correct answer. All subsequent requests, whatever the URL, whatever the get-parameters return the contents of the cache. In order to get fresh results you need to destroy the caching stuff under work/... first. Is this known? I may as well get rid of it by checking out the very last cocoon-3 version! Just asking. Could you create a JIRA issue please and attach a failing sample please? Also add the version of C3 (release or SVN revision) that you use. Thanks! - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Cocoon 3 XML serializer
Hi Simone! I am sorry, I do not use maven for the build. I imported the sources as Eclipse projects, and from there I interconnected them via dependencies. I just import the very external stuff from the maven repository. Ay, so you mean this is where my 'nice private build' ends? :-( Ciao, Jos On Thu, 2010-03-04 at 12:34 +0100, Simone Tripodi wrote: Hi Jos, these classes are not committed because they're generated from JavaCC, the JavaCC plugin should be invoked during the 'generate-source' maven phase... Doesn't it work for you? Best, Simo http://people.apache.org/~simonetripodi/ On Thu, Mar 4, 2010 at 11:04 AM, Jos Snellings jos.snelli...@pandora.be wrote: Hi! In the full checkout of the cocoon-3 SVN repository I am missing: org.apache.cocoon.sax.xpointer.XPointerFrameworkParser; org.apache.cocoon.sax.xpointer.ParseException; This prevents XIncludeTransformer from compiling. Any idea why? Jos On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hi, Is the hereunder described issue with XML serializers known? A sitemap having several xml serialization patterns: map:pipeline map:match pattern=showterm.xml map:generate type=term/ map:serialize type=xml/ /map:match map:match pattern=hierarchies map:generate type=topterms/ map:serialize type=xml / /map:match ... This pipeline is observed to have an 'eternal cache': whichever pattern is matched first gives the correct answer. All subsequent requests, whatever the URL, whatever the get-parameters return the contents of the cache. In order to get fresh results you need to destroy the caching stuff under work/... first. Is this known? I may as well get rid of it by checking out the very last cocoon-3 version! Just asking. Could you create a JIRA issue please and attach a failing sample please? Also add the version of C3 (release or SVN revision) that you use. Thanks! - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: Type 'jsp' does not exist for 'map:generate'
Hi Venura, Mmm, first I redirect this discussion to users@cocoon.apache.org, for that is the appropriate group. Next I would suggest to send the contents of your cocoon.xconf. There may be a declaration missing there. Jos On Wed, 2010-03-03 at 14:37 +0530, Venura Kahawala wrote: Hi Jos, Thanks a lot for the reply But in the bellow link it says that Jsp can be used as a generator http://cocoon.apache.org/2.1/userdocs/jsp-generator.html I latter added the bellow part to my sitemap.xmap file. map:components map:generators default=file map:generator name=jsp src=intro/ /map:generators /map:components So my new sitemap file looks like this, map:sitemap xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd; xmlns:map=http://apache.org/cocoon/sitemap/1.0; xmlns:avalon=http://cocoon.apache.org/schema/avalon; map:components map:generators default=file map:generator name=jsp src=intro/ /map:generators /map:components map:flow language=javascript/ map:pipelines map:pipeline id=demo map:match pattern=test map:generate type=jsp / map:transform src=demo/welcome.xslt/ map:serialize type=xhtml/ /map:match /map:pipeline /map:pipelines /map:sitemap This avoids the Type 'jsp' does not exist for 'map:generate' error. Here intro is the jsp file and it returns the simple xml formatted string. But when I enter the http://localhost:/ical/test; in the browser it now gives the following error, javax.servlet.ServletException: org.springframework.beans.factory.BeanDefinition StoreException: Unable to read Avalon configuration from 'sitemap.xmap' .; nested exception is org.apache.avalon.framework.configuration.ConfigurationException: Unable to create class for component with role org.apache.cocoon.generation.Gene rator/jsp with class: intro Appreciate any advise, Thanks and regards, Venura. -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Wednesday, March 03, 2010 1:57 PM To: d...@cocoon.apache.org Subject: Re: Type 'jsp' does not exist for 'map:generate' Hi again, I am sorry. xsp does not exist anymore from 2.2. My mistake. I responded in haste. Jos On Wed, 2010-03-03 at 09:21 +0100, Jos Snellings wrote: Hi, Maybe you mean: generate type=xsp src=intro.xsp/ an xsp page is a special variant of a jsp page. As far as I know, plain jsp does not fit in cocoon. Cheers On Wed, 2010-03-03 at 12:25 +0530, Venura Kahawala wrote: Hi, For cocoon 2.2, with maven, I have this pipeline in my experimental sitemap-file: map:sitemap xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd; xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:flow language=javascript/ map:pipelines map:match pattern=intro.jsp map:generate type=jsp src=intro.jsp/ map:transform src=demo/welcome.xslt/ map:serialize type=xhtml/ /map:match /map:pipeline /map:sitemap When I run the maven command “mvn jetty-run” I get the following error Caused by: org.apache.avalon.framework.configuration.ConfigurationException: Ty e 'jsp' does not exist for 'map:generate' Is there something missing in my sitemap? Or is there something I have to do with maven or do I have to add some other configurations. And if there are other configurations please advise me where I can find those files in my application. Please advise me. Greetings and thanks for helping! Venura. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Cocoon 3 XML serializer
Hi, Is the hereunder described issue with XML serializers known? A sitemap having several xml serialization patterns: map:pipeline map:match pattern=showterm.xml map:generate type=term/ map:serialize type=xml/ /map:match map:match pattern=hierarchies map:generate type=topterms/ map:serialize type=xml / /map:match ... This pipeline is observed to have an 'eternal cache': whichever pattern is matched first gives the correct answer. All subsequent requests, whatever the URL, whatever the get-parameters return the contents of the cache. In order to get fresh results you need to destroy the caching stuff under work/... first. Is this known? I may as well get rid of it by checking out the very last cocoon-3 version! Just asking. Thank you, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Strange encoding problem using forms
The two tomcat versions on the machines are the same, but, can you please make a diff between the two server.xml under $CATALINA_HOME/conf? Just to be sure ... Jos On Thu, 2010-02-11 at 11:47 +0100, Søren Krum wrote: Hello! I have a small problem with a cocoon application and forms. The application runs fine on one machine, but for some reason we want to have a mirror of that machine. Higg Avalability and failover... And here some more details: The part failing is a simple form build up via cocoon forms (we are using cocoon 2.2), where in the first screen the user has some possibilities to enter data, and in the second screen, these data get presented to confirm them before they are comitted. The cocoon flow is used to transfer the data from first to second screen and further on to the third. Entering some special characters like ö or øæå works fine on the one machine but not on the other. We tried to build up the two machines as alike as possible, the locale is the same, the tomcat and java versions are the same, the physical machine are the same, teh application is packed as a war and deployed on the same way. Anyone an idea what could be lead to the trouble? Even a guess is nice, running out of ideas here... It looks like it caused by wrong interpretation of the parameters send with the request, but why are they interpreted differently? The failure we get reads like the following: org.apache.cocoon.ProcessingException: Failed to process pipeline at map:serialize - file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:117:28 at map:transform type=xslt - file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:111:111 at map:transform type=xslt - file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:108:69 at map:generate type=jx - file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:107:68 at map:match - file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:106:50 at map:act type=cauth-is-logged-in - file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:42:42 at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:923) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:273) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:439) at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71) at $Proxy31.process(Unknown Source) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55) at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:123) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:316) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:366) at org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:62) at org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:201) at
Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)
Hi Gabriel, Very strange to have that exception there! When does it happen? Is it predictable? Kind regards, Jos On Tue, 2010-02-02 at 19:44 +0100, Gabriel Gruber wrote: Hello comunity, I found a serious bug in JNET / servlet service framework in our cocoon 2.2 based application. After some time the following Exception pops up and the only way to resolve is to restart the web application... java.lang.NullPointerException java.util.LinkedList.remove(LinkedList.java:646) java.util.LinkedList.remove(LinkedList.java:360) org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory.pop(DynamicURLStreamHandlerFactory.java:30) org.apache.cocoon.jnet.URLHandlerFactoryCollector.popUrlHandlerFactories(URLHandlerFactoryCollector.java:57) org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:39) sun.reflect.GeneratedMethodAccessor516.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy34.service(Unknown Source) org.apache.cocoon.servletservice.ServletServiceContext $PathDispatcher.forward(ServletServiceContext.java:481) org.apache.cocoon.servletservice.ServletServiceContext $PathDispatcher.forward(ServletServiceContext.java:455) org.apache.cocoon.servletservice.spring.ServletFactoryBean $ServiceInterceptor.invoke(ServletFactoryBean.java:245) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy94.service(Unknown Source) org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131) Any Ideas? I found a Jira Thread of another project using cocoon and having similar problems... http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel cheers, Gabriel - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: character encoding of a HttpServletRequest
Thanks, I will try CharacterEncodingFilter! I will lookup in the code were filtering takes place, because the problem is rather that it looks like the form data are filtered twice. In addition, do I remember right that there used to be a cocoon servlet setting, init-param param-nameform-encoding/param-name param-valueUTF-8/param-value /init-param Cheers, thanks for the hint. I will post the result... I will certainly not be the only person who is confronted with this problem. Jos On Mon, 2010-01-11 at 08:54 +, Dominic Mitchell wrote: 2010/1/10 Jos Snellings jos.snelli...@pandora.be This is not a specific cocoon issue, I believe. It probably has to do with Tomcat 5.5.27. request.setCharacterEncoding simply does not work; it does not change a thing. request.getCharacterEncoding returns nothing. You have to call request.setCharacterEncoding() really early for it to have any impact. Your best bet is to look at spring's CharacterEncodingFilter. You can add that to your web.xml to get the character set defined very early on. -Dom - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: character encoding of a HttpServletRequest
This, to notify you that the solution you suggested works fine: So, for all cocoon users: if you are experiencing problems with the character encoding of POST form data (which is very likely to occur): the problem is generally cured by Inserting the following code in web.xml filter filter-nameencodingFilter/filter-name filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueUTF-8/param-value /init-param init-param param-nameforceEncoding/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-nameencodingFilter/filter-name url-pattern/*/url-pattern /filter-mapping (Insert it as the first children under the web-app root element) Jos On Mon, 2010-01-11 at 08:54 +, Dominic Mitchell wrote: 2010/1/10 Jos Snellings jos.snelli...@pandora.be This is not a specific cocoon issue, I believe. It probably has to do with Tomcat 5.5.27. request.setCharacterEncoding simply does not work; it does not change a thing. request.getCharacterEncoding returns nothing. You have to call request.setCharacterEncoding() really early for it to have any impact. Your best bet is to look at spring's CharacterEncodingFilter. You can add that to your web.xml to get the character set defined very early on. -Dom - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: character encoding of a HttpServletRequest
That is right! It is just a confusing situation :-( The filter works fine. The init() method of a generator does not give a chance to call setCharacterEncoding, as the parsing already happened. The good thing is that the code is already in spring, so, no new external dependencies. Maybe later on I add a tryToGuessEncodingFilter. Jos On Mon, 2010-01-11 at 10:49 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hi, HttpServletRequest looks 'imperfect': Cocoon 3, alpha 2. A generator accesses the HttpServletRequest in the setup method: request = HttpContextHelper.getRequest(parameters); text = request.getParameter(tekst); The pages, including forms are ecoded in utf-8. The String 'text' is strange: the original content (utf-8) is encoded once again: if the string on the form was one character, say 'é', the string has a length of 4 bytes. It is the result of utf-8 encoding the two byte character coming from the client. So, a second conversion is happening. Now: new String(request.getParameter(text).getBytes(ISO-8859-1)) works fine. Where should this be corrected? Jos, in Cocoon 3 there isn't any code that changes the encoding of request parameters. The plain HttpServletRequest as provided by the servlet container is used. IIRC Tomcat uses ISO-8859-1 by default which follows the recommendation of the Servlet API spec: ~~~ SRV.4.9 Request data encoding Currently, many browsers do not send a char encoding qualifier with the Content-Type header, leaving open the determination of the character encoding for reading HTTP requests. The default encoding of a request the container uses to create the request reader and parse POST data must be “ISO-8859-1” if none has been specified by the client request. However, in order to indicate to the developer in this case the failure of the client to send a character encoding, the container returns null from the getCharacterEncoding method. If the client hasn’t set character encoding and the request data is encoded with a different encoding than the default as described above, breakage can occur. To remedy this situation, a new method setCharacterEncoding(String enc) has been added to the ServletRequest interface. Developers can override the character encoding supplied by the container by calling this method. It must be called prior to parsing any post data or reading any input from the request. Calling this method once data has been read will not affect the encoding. ~~~ So as some others suggested, the best option is using one of the CharecterEncoding servlet filters and not to remedy this situation somewhere in C3. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: character encoding of a HttpServletRequest
This is not a specific cocoon issue, I believe. It probably has to do with Tomcat 5.5.27. request.setCharacterEncoding simply does not work; it does not change a thing. request.getCharacterEncoding returns nothing. Best, Jos On Sat, 2010-01-09 at 08:01 +0100, Jos Snellings wrote: Hi, HttpServletRequest looks 'imperfect': Cocoon 3, alpha 2. A generator accesses the HttpServletRequest in the setup method: request = HttpContextHelper.getRequest(parameters); text = request.getParameter(tekst); The pages, including forms are ecoded in utf-8. The String 'text' is strange: the original content (utf-8) is encoded once again: if the string on the form was one character, say 'é', the string has a length of 4 bytes. It is the result of utf-8 encoding the two byte character coming from the client. So, a second conversion is happening. Now: new String(request.getParameter(text).getBytes(ISO-8859-1)) works fine. Where should this be corrected? Cheers, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
character encoding of a HttpServletRequest
Hi, HttpServletRequest looks 'imperfect': Cocoon 3, alpha 2. A generator accesses the HttpServletRequest in the setup method: request = HttpContextHelper.getRequest(parameters); text = request.getParameter(tekst); The pages, including forms are ecoded in utf-8. The String 'text' is strange: the original content (utf-8) is encoded once again: if the string on the form was one character, say 'é', the string has a length of 4 bytes. It is the result of utf-8 encoding the two byte character coming from the client. So, a second conversion is happening. Now: new String(request.getParameter(text).getBytes(ISO-8859-1)) works fine. Where should this be corrected? Cheers, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: escaping special characters in an XSP String
Hi Paul, Can you please explain the purpose of not escaping? Do you want for instance to prevent ampersand from being converted to amp; ? Best, Jos On Mon, 2009-12-07 at 13:21 +, Paul Adriaenssens wrote: Hi, I want to avoid escaping special characters in an xsp String retrieved through xsp:expr. In the archives http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg20263.html https://webmail.ua.ac.be/exchweb/bin/redir.asp?URL=http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg20263.html http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg16145.html https://webmail.ua.ac.be/exchweb/bin/redir.asp?URL=http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg16145.html I found this as a solution: util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr However it does not work, I see nothing in the output! Any ideas? We are using cocoon 2.1.11 ... Regards, Paul Adriaenssens - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: configuring Jetty to log into a file
Look for any log4j.xml or log4j.properties in the classpath. There is a log4j.xml in the cocoon samples in ./rcl-config/WEB-INF/log4j.xml. A log file is created in param name=File value=./target/work/log/cocoon.log/ Jos On Sun, 2009-12-06 at 22:39 +0100, Johannes Lichtenberger wrote: Well, it's maybe not really cocoon specific, but I use mvn jetty:run to run jetty and I'm getting an Error in a recursive function so the stack trace is too long to follow in my shell. Does perhaps someone know how to configure jetty to log stacktraces in a file? greetings, Johannes - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
URLConnectionUtils.closeLoudly()
Hi! At the end of RESTController I get: 2009-12-04 14:57:26,014 ERROR http-8080-Processor20 org.apache.cocoon.sitemap.InvocationImpl/handle-errors - Error while executing the sitemap. [request-uri=/editor/put/definition/1124] java.lang.NullPointerException at org.apache.cocoon.pipeline.util.URLConnectionUtils.closeQuietly(URLConnectionUtils.java:37) at org.apache.cocoon.rest.controller.response.URLResponse.execute(URLResponse.java:91) at org.apache.cocoon.rest.controller.SpringRESTController.invoke(SpringRESTController.java:88) at org.apache.cocoon.controller.SpringControllerComponent.execute(SpringControllerComponent.java:50) at org.apache.cocoon.pipeline.AbstractPipeline.invokeStarter(AbstractPipeline.java:147) at org.apache.cocoon.pipeline.CachingPipeline.execute(CachingPipeline.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) It is certainly not closing a connection quietly :-) In URLResponse.java, is it possible that in execute() servletConnection = this.url.openConnection(); is null? Responses are like: if (action.equals(st)) return new URLResponse(servlet:/thesaurusedit/stdemo,data); if (action.equals(term)) return new URLResponse(servlet:/edit/term, data); } return new URLResponse(servlet:editor/workspace, data); Is there an obvious mistake I am making? Thanks, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: URLConnectionUtils.closeLoudly()
You are right in literal.equals(param), but that is not the source of the problem. Like smoking, it is a habit I'd better give up ;-) Jos On Fri, 2009-12-04 at 15:29 +0100, Johannes Lichtenberger wrote: On Fri, 2009-12-04 at 15:15 +0100, Jos Snellings wrote: [StackTrace] It is certainly not closing a connection quietly :-) In URLResponse.java, is it possible that in execute() servletConnection = this.url.openConnection(); is null? Responses are like: if (action.equals(st)) return new URLResponse(servlet:/thesaurusedit/stdemo,data); if (action.equals(term)) return new URLResponse(servlet:/edit/term, data); } return new URLResponse(servlet:editor/workspace, data); Well, you know I'm not really familiar with cocoon, but I would replace action.equals(st) with st.equals(action) and action.equals(term) equally, so you can't get NullPointerExceptions in this place (I know it's not the source of the problem). greetings, Johannes - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: URLConnectionUtils.closeLoudly()
This is one for documentation: from the examples: URLResponse(servlet:/somewherehere,data) does not work if you specify the root url. Notation is absolute (with servlet:) if /somewherehere is in the same pipeline it works! However, closeQuietly does not close quietly if the urlconnection is null. The exception is thrown by the method and caught in the caller. That is the silent part. Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: REST / Can't find URLResponseBuilder
O yes, you are right! It dates from a couple of trials in alpha-1, when I was having trouble to make setup() work. Thanks. Jos On Tue, 2009-12-01 at 22:21 +0100, Steven Dolg wrote: Jos Snellings schrieb: If I understand you well, your assignment is to: * catch a get URL emitted by Google Earch * this url contains coordinates * on the basis of these coordinates you lookup things in an XML file. Here's my advice: forget about the RESTController and just write a generator, like: public class SehensWuerdigkeitenGenerator extends AbstractSAXGenerator implements CachingPipelineComponent { @SitemapParameter private String language; @SitemapParameter private String cmd; private String pur; private String par; private HttpServletRequest request; Well I agree that this looks very nice, unfortunately the @SitemapParameter annotation is only available in the REST module of Cocoon and only working for Controllers. A meaningful explanation would include the layered approach and assumptions about the environment - I'll do this another time. However the intended way would be: for Parameters retrieved through the sitemap @Override public void setConfiguration(MapString, ? extends Object parameters) { this.language = (String) parameters.get(language); } for Parameters retrieved through the actual invocation (e.g. HTTP request) @Override public void setup(MapString, Object parameters) { this.cmd = (String)parameters.get(cmd); } And you do the interesting bits within: public void execute() { - read your bits SAXConsumer consumer = this.getSAXConsumer(); try { consumer.startDocument(); consumer.startElement(, page, page, new AttributesImpl()); --- do the interesting stuff to be sent to XSLT } Oh, by the way, another possibility: just read your XML file if it's just one. And extract the chunks you need in the XSLT transform, with XPath. The last could be the shorter. Mmmm you are a student. I am an old man and I would say: bear in mind that 'REST' is just another concept, sometimes java people like to make things complicated... Why make things simple and efficient if you can make them complex and wonderful. And now I know where this marvelous quote is from. Well done, old man! :-P Steven By the way, I will redirect this discussion to cocoon users. Cheers, Jos On Sun, 2009-11-29 at 13:19 +0100, Johannes Lichtenberger wrote: On Sun, 2009-11-29 at 07:32 +0100, Jos Snellings wrote: In the samples, a typical use of StringTemplate is shown: a page is to be interpreted by the StringTemplate engine, and a number of properties are passed via the hashtable. The idea is that you would open a view on the object. So, - the query points to a resource - the controller decodes what the resource is and what you want (view it, update it?) - the way to view it could be: pass my resource to a StringTemplate invocation: new Page('stringtemplateinvocation',resource); However, I have not tried to elaborate this so far. Shall I post it when i have a useable example? Yes it would be great. My concern is that I don't want to display a template page. I want to process the request (the parameters Google Earth sends when zooming in) and within my Generator query a native XML database system and built the algorithmic logic inside the generator (what data out of the shreddered xml file is needed and has to be transformed with an XSLT stylesheet). So I basically know how RESTful webservices work, but I don't know how to use cocoon3 in this case (I assume new Page(...) isn't the right thing to return when I just want to pass the request params to my generator. So I don't want to use StringTemplate in this case (but it's nontheless a great thing). So the query points to a controller, which decides that it's a GET request (view) and passes the parameters on to my generator (which I still have to write). Would be great if you or someone else could help me out (it's a project in a course of our university ;-) and I thought cocoon is great for this concern (get RESTful parameters, hand it on to a generator which selects the needed data out of a shreddered xml file according to the parameters, then transform the xml fragments with a XSLT stylesheet and serialize the result, so that Google Earth can use the KML fragments generated). Thank you, Johannes - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e
Re: REST / Can't find URLResponseBuilder
If I understand you well, your assignment is to: * catch a get URL emitted by Google Earch * this url contains coordinates * on the basis of these coordinates you lookup things in an XML file. Here's my advice: forget about the RESTController and just write a generator, like: public class SehensWuerdigkeitenGenerator extends AbstractSAXGenerator implements CachingPipelineComponent { @SitemapParameter private String language; @SitemapParameter private String cmd; private String pur; private String par; private HttpServletRequest request; And you do the interesting bits within: public void execute() { - read your bits SAXConsumer consumer = this.getSAXConsumer(); try { consumer.startDocument(); consumer.startElement(, page, page, new AttributesImpl()); --- do the interesting stuff to be sent to XSLT } Oh, by the way, another possibility: just read your XML file if it's just one. And extract the chunks you need in the XSLT transform, with XPath. The last could be the shorter. Mmmm you are a student. I am an old man and I would say: bear in mind that 'REST' is just another concept, sometimes java people like to make things complicated... Why make things simple and efficient if you can make them complex and wonderful. By the way, I will redirect this discussion to cocoon users. Cheers, Jos On Sun, 2009-11-29 at 13:19 +0100, Johannes Lichtenberger wrote: On Sun, 2009-11-29 at 07:32 +0100, Jos Snellings wrote: In the samples, a typical use of StringTemplate is shown: a page is to be interpreted by the StringTemplate engine, and a number of properties are passed via the hashtable. The idea is that you would open a view on the object. So, - the query points to a resource - the controller decodes what the resource is and what you want (view it, update it?) - the way to view it could be: pass my resource to a StringTemplate invocation: new Page('stringtemplateinvocation',resource); However, I have not tried to elaborate this so far. Shall I post it when i have a useable example? Yes it would be great. My concern is that I don't want to display a template page. I want to process the request (the parameters Google Earth sends when zooming in) and within my Generator query a native XML database system and built the algorithmic logic inside the generator (what data out of the shreddered xml file is needed and has to be transformed with an XSLT stylesheet). So I basically know how RESTful webservices work, but I don't know how to use cocoon3 in this case (I assume new Page(...) isn't the right thing to return when I just want to pass the request params to my generator. So I don't want to use StringTemplate in this case (but it's nontheless a great thing). So the query points to a controller, which decides that it's a GET request (view) and passes the parameters on to my generator (which I still have to write). Would be great if you or someone else could help me out (it's a project in a course of our university ;-) and I thought cocoon is great for this concern (get RESTful parameters, hand it on to a generator which selects the needed data out of a shreddered xml file according to the parameters, then transform the xml fragments with a XSLT stylesheet and serialize the result, so that Google Earth can use the KML fragments generated). Thank you, Johannes - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon 3: xslt and pickup java scripts: Firebug
I have seen these, they are in 'cocoon-optional', but how to configure in the pipeline? map:serialize type=exhtml/ or ehtml? (are there new samples? I did not know) On Thu, 2009-11-26 at 18:22 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Indeed, Robby, this is clearly the behaviour we are observing. But, even if you avoid the minimized tags, I have the impression that the XSLT step is converting empty tag pairs to minimized ones. Shouldn't we avoid this, given the recommendation? Some weeks ago I added alternative serializers for HTML/XML/XHTML to Cocoon 3 trunk. Those take care of many of those tricky serialization problems. Look for Encoding Serializers in the samples. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
cocoon 3: xslt and pickup java scripts
Hello ! I have a strange observation to share: when multiple javascripts are included in an XSLT transformation, to land in the head of an html page, it is observed that some are never fetched, by FireFox 3.5.5 (Ubuntu). I clarify: exerpt 1: from sitemap, pipeline for static resources: map:pipeline type=async-caching map:match pattern=images/{name}.jpg map:read src=presentation/images/{map:name}.jpg mime-type=image/jpeg / /map:match map:match pattern=images/{name}.gif map:read src=presentation/images/{map:name}.gif mime-type=image/gif / /map:match map:match pattern=css/{name}.css map:read src=presentation/style/{map:name}.css mime-type=text/css / /map:match map:match pattern=css/images/{name} map:read src=presentation/style/images/{map:name} mime-type=image/png / /map:match map:match pattern=js/{name}.js map:read src=presentation/javascript/{map:name}.js / /map:match -- xsl:template match=/ html head title Herein Thesaurus /title link rel=stylesheet type=text/css href=/thesaurus/css/herein.css/ link rel=stylesheet type=text/css href=/thesaurus/css/jquery_treeview.css/ script type=text/javascript src=/thesaurus/js/jquery.js/script script type=text/javascript src=/thesaurus/js/jquery_cookie.js/script script type=text/javascript src=/thesaurus/js/jquery_treeview.js/script script type=text/javascript src=/thesaurus/js/thesaurus.js/script script type=text/javascript $(function() { $(#tree).treeview({ collapsed: true, animated: medium, control:#sidetreecontrol, persist: location }); }) /script /head - I detailed the log to debug level for the cocoon output, and, to my amazement, I find that the pipeline does not react at all: javascripts jquery_treeview and jquery_cookie are never fetched. -- Observation: when I place the same html under the form of a static html page, all the scripts are nicely fetched. What could be the cause of this - admittedly strange - phenomenon? Anybody observed a similar test case? Reinhard, as you make heavy use of rich client javascripting, do you know about this? Am I overlooking something essential? I see no reason why the result of a xslt transformation would behave different, so obviously I am. Kind regards, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon 3: xslt and pickup java scripts
I was about to do that, it really points in the direction of firefox. I will let you know On Wed, 2009-11-25 at 12:44 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hello ! I have a strange observation to share: when multiple javascripts are included in an XSLT transformation, to land in the head of an html page, it is observed that some are never fetched, by FireFox 3.5.5 (Ubuntu). I clarify: exerpt 1: from sitemap, pipeline for static resources: map:pipeline type=async-caching map:match pattern=images/{name}.jpg map:read src=presentation/images/{map:name}.jpg mime-type=image/jpeg / /map:match map:match pattern=images/{name}.gif map:read src=presentation/images/{map:name}.gif mime-type=image/gif / /map:match map:match pattern=css/{name}.css map:read src=presentation/style/{map:name}.css mime-type=text/css / /map:match map:match pattern=css/images/{name} map:read src=presentation/style/images/{map:name} mime-type=image/png / /map:match map:match pattern=js/{name}.js map:read src=presentation/javascript/{map:name}.js / /map:match -- xsl:template match=/ html head title Herein Thesaurus /title link rel=stylesheet type=text/css href=/thesaurus/css/herein.css/ link rel=stylesheet type=text/css href=/thesaurus/css/jquery_treeview.css/ script type=text/javascript src=/thesaurus/js/jquery.js/script script type=text/javascript src=/thesaurus/js/jquery_cookie.js/script script type=text/javascript src=/thesaurus/js/jquery_treeview.js/script script type=text/javascript src=/thesaurus/js/thesaurus.js/script script type=text/javascript $(function() { $(#tree).treeview({ collapsed: true, animated: medium, control:#sidetreecontrol, persist: location }); }) /script /head - I detailed the log to debug level for the cocoon output, and, to my amazement, I find that the pipeline does not react at all: javascripts jquery_treeview and jquery_cookie are never fetched. -- Observation: when I place the same html under the form of a static html page, all the scripts are nicely fetched. What could be the cause of this - admittedly strange - phenomenon? Anybody observed a similar test case? Reinhard, as you make heavy use of rich client javascripting, do you know about this? Am I overlooking something essential? I see no reason why the result of a xslt transformation would behave different, so obviously I am. This sounds like some browser caching issue. Have you used Firebug to track down the problem? - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon 3: xslt and pickup java scripts
Hi Glen, Just a very quick test (I have to leave in a minute) shows that your trick works. Thank you very much for sharing it. Now it remains to find out why xhtml shows this behaviour and whether it is only a firefox issue or not. Jos On Wed, 2009-11-25 at 11:32 +, Glen Robson wrote: Hi, I don't know if its related but I have had problems with firefox and javascript if the serializer was set to return xhtml. As soon as I set the serializer to html the javascript seems to work OK. Thanks Glen On 25 Nov 2009, at 10:59, Jos Snellings wrote: Hello ! I have a strange observation to share: when multiple javascripts are included in an XSLT transformation, to land in the head of an html page, it is observed that some are never fetched, by FireFox 3.5.5 (Ubuntu). I clarify: exerpt 1: from sitemap, pipeline for static resources: map:pipeline type=async-caching map:match pattern=images/{name}.jpg map:read src=presentation/images/{map:name}.jpg mime-type=image/jpeg / /map:match map:match pattern=images/{name}.gif map:read src=presentation/images/{map:name}.gif mime-type=image/gif / /map:match map:match pattern=css/{name}.css map:read src=presentation/style/{map:name}.css mime-type=text/css / /map:match map:match pattern=css/images/{name} map:read src=presentation/style/images/{map:name} mime-type=image/png / /map:match map:match pattern=js/{name}.js map:read src=presentation/javascript/{map:name}.js / /map:match -- xsl:template match=/ html head title Herein Thesaurus /title link rel=stylesheet type=text/css href=/thesaurus/css/herein.css/ link rel=stylesheet type=text/css href=/thesaurus/css/jquery_treeview.css/ script type=text/javascript src=/thesaurus/js/jquery.js/script script type=text/javascript src=/thesaurus/js/jquery_cookie.js/script script type=text/javascript src=/thesaurus/js/jquery_treeview.js/script script type=text/javascript src=/thesaurus/js/thesaurus.js/script script type=text/javascript $(function() { $(#tree).treeview({ collapsed: true, animated: medium, control:#sidetreecontrol, persist: location }); }) /script /head - I detailed the log to debug level for the cocoon output, and, to my amazement, I find that the pipeline does not react at all: javascripts jquery_treeview and jquery_cookie are never fetched. -- Observation: when I place the same html under the form of a static html page, all the scripts are nicely fetched. What could be the cause of this - admittedly strange - phenomenon? Anybody observed a similar test case? Reinhard, as you make heavy use of rich client javascripting, do you know about this? Am I overlooking something essential? I see no reason why the result of a xslt transformation would behave different, so obviously I am. Kind regards, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon 3: xslt and pickup java scripts: Firebug
Hi ! Here is what Firebug has to tell: when an xhtml serializer is selected, this is the output: script src=/thesaurus/js/jquery.js type=text/javascript/ script src=/thesaurus/js/jquery_cookie.js type=text/javascript/ script src=/thesaurus/js/jquery_treeview.js type=text/javascript/ script type=text/javascript $(function() { $(#tree).treeview({ collapsed: true, animated: medium, control:#sidetreecontrol, persist: location }); }) /script --- Firefox sees only the first javascript. By the way: in het xslt rule the script tags are: script src=/thesaurus/js/jquery.js type=text/javascript/script but these are converted to single elements script/, and it looks as if Firefox has a problem. - A DOM inspection confirms this: It looks as if the subsequent script tags are regarded as sub-elements of the first script tag. I haven't tested with other browsers. Is this to be considered as an issue? Fact is that the produced xhtml is valid and *should* work. Kind regards, Jos On Wed, 2009-11-25 at 13:16 +0100, Jos Snellings wrote: I was about to do that, it really points in the direction of firefox. I will let you know On Wed, 2009-11-25 at 12:44 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hello ! I have a strange observation to share: when multiple javascripts are included in an XSLT transformation, to land in the head of an html page, it is observed that some are never fetched, by FireFox 3.5.5 (Ubuntu). I clarify: exerpt 1: from sitemap, pipeline for static resources: map:pipeline type=async-caching map:match pattern=images/{name}.jpg map:read src=presentation/images/{map:name}.jpg mime-type=image/jpeg / /map:match map:match pattern=images/{name}.gif map:read src=presentation/images/{map:name}.gif mime-type=image/gif / /map:match map:match pattern=css/{name}.css map:read src=presentation/style/{map:name}.css mime-type=text/css / /map:match map:match pattern=css/images/{name} map:read src=presentation/style/images/{map:name} mime-type=image/png / /map:match map:match pattern=js/{name}.js map:read src=presentation/javascript/{map:name}.js / /map:match -- xsl:template match=/ html head title Herein Thesaurus /title link rel=stylesheet type=text/css href=/thesaurus/css/herein.css/ link rel=stylesheet type=text/css href=/thesaurus/css/jquery_treeview.css/ script type=text/javascript src=/thesaurus/js/jquery.js/script script type=text/javascript src=/thesaurus/js/jquery_cookie.js/script script type=text/javascript src=/thesaurus/js/jquery_treeview.js/script script type=text/javascript src=/thesaurus/js/thesaurus.js/script script type=text/javascript $(function() { $(#tree).treeview({ collapsed: true, animated: medium, control:#sidetreecontrol, persist: location }); }) /script /head - I detailed the log to debug level for the cocoon output, and, to my amazement, I find that the pipeline does not react at all: javascripts jquery_treeview and jquery_cookie are never fetched. -- Observation: when I place the same html under the form of a static html page, all the scripts are nicely fetched. What could be the cause of this - admittedly strange - phenomenon? Anybody observed a similar test case? Reinhard, as you make heavy use of rich client javascripting, do you know about this? Am I overlooking something essential? I see no reason why the result of a xslt transformation would behave different, so obviously I am. This sounds like some browser caching issue. Have you used Firebug to track down the problem? - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr
RE: cocoon 3: xslt and pickup java scripts: Firebug
Indeed, Robby, this is clearly the behaviour we are observing. But, even if you avoid the minimized tags, I have the impression that the XSLT step is converting empty tag pairs to minimized ones. Shouldn't we avoid this, given the recommendation? Jos On Wed, 2009-11-25 at 17:02 +0100, Robby Pelssers wrote: Some article explains a bit more: http://forums.mozillazine.org/viewtopic.php?f=25t=297285 The first empty DIV closes itself with the trailing slash. This is allowed in XML (XHTML is XML), but it is not allowed in HTML. If your document (1) has an XHTML doctype declaration at the beginning of the document, (2) has the proper namespace declaration, and (3) is being served with the proper mime type by the server (application/xhtml+xml), there is no difference between those two empty DIVs. However, if you miss any of those three criteria, your document is not going to be rendered as XML, and you will not get the results you expect. With the wrong mime type sent by the server, the document will be rendered as HTML. In HTML, div / syntax will be read as an opening div tag, and the browser will expect a closing tag. The XHTML compatibility guidelines advise you not to use the minimized tag syntax for compatibility reasons. Even if Firefox renders your XHTML properly, older browsers that only understand HTML will choke and die on the DIV that is not properly closed in HTML. Read 4.3 and 4.6 here. -Original Message- From: Robby Pelssers [mailto:robby.pelss...@ciber.com] Sent: Wednesday, November 25, 2009 4:58 PM To: users@cocoon.apache.org Subject: RE: cocoon 3: xslt and pickup java scripts: Firebug I've seen this behavior for other tags as well... For instance with empty div tags In that case subsequent tags are sometimes treated as children of the empty preceding div tag. Kind regards, Robby -Original Message- From: Jos Snellings [mailto:jos.snelli...@pandora.be] Sent: Wednesday, November 25, 2009 4:51 PM To: users@cocoon.apache.org Subject: Re: cocoon 3: xslt and pickup java scripts: Firebug Hi ! Here is what Firebug has to tell: when an xhtml serializer is selected, this is the output: script src=/thesaurus/js/jquery.js type=text/javascript/ script src=/thesaurus/js/jquery_cookie.js type=text/javascript/ script src=/thesaurus/js/jquery_treeview.js type=text/javascript/ script type=text/javascript $(function() { $(#tree).treeview({ collapsed: true, animated: medium, control:#sidetreecontrol, persist: location }); }) /script --- Firefox sees only the first javascript. By the way: in het xslt rule the script tags are: script src=/thesaurus/js/jquery.js type=text/javascript/script but these are converted to single elements script/, and it looks as if Firefox has a problem. - A DOM inspection confirms this: It looks as if the subsequent script tags are regarded as sub-elements of the first script tag. I haven't tested with other browsers. Is this to be considered as an issue? Fact is that the produced xhtml is valid and *should* work. Kind regards, Jos On Wed, 2009-11-25 at 13:16 +0100, Jos Snellings wrote: I was about to do that, it really points in the direction of firefox. I will let you know On Wed, 2009-11-25 at 12:44 +0100, Reinhard Pötz wrote: Jos Snellings wrote: Hello ! I have a strange observation to share: when multiple javascripts are included in an XSLT transformation, to land in the head of an html page, it is observed that some are never fetched, by FireFox 3.5.5 (Ubuntu). I clarify: exerpt 1: from sitemap, pipeline for static resources: map:pipeline type=async-caching map:match pattern=images/{name}.jpg map:read src=presentation/images/{map:name}.jpg mime-type=image/jpeg / /map:match map:match pattern=images/{name}.gif map:read src=presentation/images/{map:name}.gif mime-type=image/gif / /map:match map:match pattern=css/{name}.css map:read src=presentation/style/{map:name}.css mime-type=text/css / /map:match map:match pattern=css/images/{name} map:read src=presentation/style/images/{map:name} mime-type=image/png / /map:match map:match pattern=js/{name}.js map:read src=presentation/javascript/{map:name}.js / /map:match -- xsl:template match=/ html head title Herein Thesaurus /title link rel=stylesheet type=text/css
Re: Timer on cocoon
Is MyTimerThread the task you want to schedule? - you could create a spring bean, with org.springframework.scheduling.quartz.JobDetailBean - you can start your timerthread in the init() method of a servlet to start a task off when cocoon starts working. Not sure if that works for 2.2. Hope that helps... On Tue, 2009-11-24 at 13:16 +0200, Gintare Ragaisiene wrote: Hi, Jos, Quartz is ok and Java Timer is ok for me. But haw and where I should input lines like MyTimerThread.start() to start timer when cocoon starts working on server ? Gintare On Tue, Nov 24, 2009 at 11:10 AM, Jos Snellings jos.snelli...@pandora.be wrote: Hi, Gintare, Cocoon is not even remotely a system to schedule operations. Maybe you are looking for something like http://www.quartz-scheduler.org/ Most OS let you schedule jobs. Jos On Tue, 2009-11-24 at 10:53 +0200, Gintare Ragaisiene wrote: Hello, I need to do some job with db periodically. For this I need to set up timer. How can I do this in cocoon 2.2 ? Thanks, Gintare - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon3 block deployment
Please find below the follow up on the tomcat deployment problem. I am sure it is of interest to a lot of users: With the latest sources checked out from svn, built in eclipse the problem is solved. Deployment under tomcat: 1. add xercesImpl.jar 2. in the local build I have no pom.properties file included in the jar (in fact, in my builds there is no META-INF/maven), so XMLSitemapServlet.initVersionNumber() will fail, I stubbed that method for the time being. 3. An entry Cocoon-Block-Name in the manifest file is not necessary, this invalidates: http://cocoon.apache.org/subprojects/block-deployment/1.1/1471_1_1.html Blocks are neatly deployed under the mount point specified in the servlet-service bean declaration. I had to adapt the samples to the alpha-2 level. Some classes were refactored to cocoon-sax, others are obsolete. Is the new version available? Care for the adapted code? Cheers, Jos - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org