[jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
[ https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francesco Chicchiriccò closed COCOON3-129. -- Resolution: Fixed Create an example to send a mail via cocoon --- Key: COCOON3-129 URL: https://issues.apache.org/jira/browse/COCOON3-129 Project: Cocoon 3 Issue Type: New Feature Components: cocoon-rest-optional Affects Versions: 3.0.0-beta-1 Reporter: Thorsten Scherler Fix For: 3.0.0-beta-1 Attachments: apache-tomcat-6.0.39.exe, build.xml http://markmail.org/message/6ces6erwekf57qfo as requested from hansheinrichbraun in above mail I extracted a simple example to send a mail with cocoon based on work of codebusters.es. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
[ https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Javier Puerto closed COCOON3-129. - Resolution: Fixed Create an example to send a mail via cocoon --- Key: COCOON3-129 URL: https://issues.apache.org/jira/browse/COCOON3-129 Project: Cocoon 3 Issue Type: New Feature Components: cocoon-rest-optional Affects Versions: 3.0.0-beta-1 Reporter: Thorsten Scherler Fix For: 3.0.0-beta-1 http://markmail.org/message/6ces6erwekf57qfo as requested from hansheinrichbraun in above mail I extracted a simple example to send a mail with cocoon based on work of codebusters.es. -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Hello Thorsten, I want to use Jexl in your EmailPipeline, but I don't know how to Implement it in your Example ? Am 24.07.2013 22:17, schrieb Thorsten Scherler: On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Hello Thorsten, how can I implement the functionality of map:generate src=controller/xml/{map:file}.xml type=controller-aware-string-template / in your EmailPlainPipe and how to transfer the map to the Generator and make resolve the references or is the replacementwork done before? in your email-pipeline Am 24.07.2013 22:17, schrieb Thorsten Scherler: On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Hello Thorsten, I now looked deeper in the two cocoon applications. The Fop-config problem ist solved because the normal Fopserializer allows userconfig. If I stil lneed the FOPNGSerializer I will see. Concerning my mail problem you offered the SendMailPipeServiceI. I now try to use pipelines for the attachements. Maybe I will come back with some configuration questions. Am 09.03.2014 09:47, schrieb Yahoo: Hello Thorsten, it lasted a long time to bring my wicket appliication up to the latest wicket, spring,hibernate,appfuse,hibernate lucene text search,automatic creation of the database from bean annotation by dbunit. I succeeded to include hibernate in cocoon. Now I get back to the specialities of my cocoon applications. Concerning the Fop serializer: i I used the FOPNGSerializer and fop-config.xml to include englischeschjoit.ttf. The second speciality is the reason I used a SendMailTransformer getting the Mail Text from a cocoon pipeline and also the attachement. At the moment I don't see how I could achieve this. The other possibility you mentioned to look for is the node.js environment, where there is a hype at the moment. But here I have no exoerience and I don't know with what to start to achieve the above mentioned functionality. Especially by what to replace Hibernate. Am 24.07.2013 22:17, schrieb Thorsten Scherler: offered the MailOn 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Hello Thorsten, it lasted a long time to bring my wicket appliication up to the latest wicket, spring,hibernate,appfuse,hibernate lucene text search,automatic creation of the database from bean annotation by dbunit. I succeeded to include hibernate in cocoon. Now I get back to the specialities of my cocoon applications. Concerning the Fop serializer: i I used the FOPNGSerializer and fop-config.xml to include englischeschjoit.ttf. The second speciality is the reason I used a SendMailTransformer getting the Mail Text from a cocoon pipeline and also the attachement. At the moment I don't see how I could achieve this. The other possibility you mentioned to look for is the node.js environment, where there is a hype at the moment. But here I have no exoerience and I don't know with what to start to achieve the above mentioned functionality. Especially by what to replace Hibernate. Am 24.07.2013 22:17, schrieb Thorsten Scherler: On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Am 24.07.2013 22:17, schrieb Thorsten Scherler: On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2 I changed the name of the the groupId of cocoon-rest-optional install it and make it a dependency of my application. With cocoon-sample I am successful with your application I get the error 2013-07-26 16:55:08.684:WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext{/,file:/homeerweitert/java/wicket/appfuse/makler/src/main/webapp/},file:/homeerweitert/java/wicket/appfuse/makler/src/main/webapp/ org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'mailSender' defined in URL [jar:file:/homeerweitert/java/.m2/repository/braunimmobilien/cocoon-rest-optional/3.0.0-beta-1-SNAPSHOT/cocoon-rest-optional-3.0.0-beta-1-SNAPSHOT.jar!/META-INF/cocoon/spring/block-application-context.xml]: Could not resolve placeholder 'email.host' in string value ${email.host}
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Am 24.07.2013 22:17, schrieb Thorsten Scherler: On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. Thank you for your information. I will have a closer look at the products json and node.js. I found even a mail if node.js makes wicket even superfluous. Even for PDFCreation there is a Javascript product: PDFKit http://devongovett.github.com/pdfkit/ However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Am 24.07.2013 07:19, schrieb Piratenvisier: Am 23.07.2013 14:30, schrieb Thorsten Scherler: On 07/23/2013 12:58 PM, Piratenvisier wrote: ... I get the error: java.net.MalformedURLException: unknown protocol: servlet at java.net.URL.init(URL.java:592) at java.net.URL.init(URL.java:482) at java.net.URL.init(URL.java:431) at org.apache.cocoon.rest.controller.response.URLResponse.init(URLResponse.java:49) at org.apache.cocoon.sample.controller.DemoRESTController.doGet(DemoRESTController.java:54) Not sure but seems that he cannot resolve: return new URLResponse(servlet:/controller/screen, data); When I went back to the original distribution without any changes and even when I try new URL(new URL(servlet:),servlet:/controller/screen) I get the same error,although I think that I once had success with the distribution. Hmm not sure, I just tried the samples and they work fine for me. cd ~/src/apache/c3/cocoon-sample svn up At revision 1506007. mvn clean install jetty:run http://localhost:/jax-rs/sample/parameter-passing/5?req-param=7 works fine. Maybe this is the cause : When i try to install cocoon with maven I get the error Unable to initialise extensions Component descriptor role: 'com.jcraft.jsch.UIKeyboardInteractive', implementation: 'org.apache.maven.wagon.providers.ssh.jsch.interactive.PrompterUIKeyboardInteractive', role hint: 'default' has a hint, but there are other implementations that don't concerning this error I have at the moment no answer. when I have solved this I come back to the servlet problem. Because of this problem I don't know what software I link as beta-1 Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. -- Thorsten Scherler scherler.at.gmail.com codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2 -- Thorsten Scherler scherler.at.gmail.com codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Am 24.07.2013 22:17, schrieb Thorsten Scherler: On 07/24/2013 05:30 PM, Piratenvisier wrote: ... Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). I got a programmed fop-pipeline running. Under wicket you have to grant access to the stylesheets und let wicket give you the full href. Actually you can call a java cocoon pipeline from wicket to do the job for you. ;) ...but seriously there are many fish in the sea and I myself ATM are experiencing node.js which is really rapid in terms of development especially if your gui is using json. Our company has create a framework called rapidMobile where I am ATM testing to serve the static html5 part with creating a node.js server around it, instead of using c3 as we did before. While playing around I found it pretty easy to create basic REST services for node and do some REST services that prior had been in cocoon (maybe re-factored to go into node). What I am trying to say is that cocoon is the best in what it is designed for: being a lib capable of use x input formats and serialize to n output formats. The whole idea for myself is best expressed in Apache Forrest and they concept of input, internal and output modules. Where everything is drilled down to an internal language so it easy to create various input and output formats. Thank you for your remark above. It fits to a remark I once read from one of the inventors of cocoon who told that he found out that more and more functionality of cocoon is offered by the browser. Yes with AJAX HTML5 json I see a browser revival after concepts like eclipse rcp which I once found state of the art and today I would avoid. Cocoon-sample now does its restjob. Don't know what was the problem. But in my application I still have the same error. I think the reasen is that I integrated cocoon in wicket. I think I have to seperate it from wicket only coupled by web.xml. However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 I got your example running, thank you I aknowledge that cocoon is again getting interesting. yeah :) salu2
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Am 22.07.2013 16:10, schrieb Thorsten Scherler: On 07/22/2013 12:17 PM, Piratenvisier wrote: I have some problem getting the Restexample running: In the pom I have : dependency groupIdorg.apache.cocoon.pipeline/groupId artifactIdcocoon-pipeline/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.databases/groupId artifactIdcocoon-databases/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.sax/groupId artifactIdcocoon-sax/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.rest/groupId artifactIdcocoon-rest/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.stringtemplate/groupId artifactIdcocoon-stringtemplate/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.wicket/groupId artifactIdcocoon-wicket/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.optional/groupId artifactIdcocoon-optional/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.xmlgraphics/groupId artifactIdfop/artifactId version1.0/version /dependency dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-serializers-charsets/artifactId version${cocoon.serializers.charset.version}/version /dependency /dependencies my sitemap includes : map:pipeline map:match pattern=controller/{id}/{name} controller:call controller=rest-controller select=org.apache.cocoon.sample.controller.DemoRESTController map:parameter name=id value={map:id} / map:parameter name=name value={map:name} / /controller:call /map:match /map:pipeline map:pipeline type=noncaching map:match pattern=controller/screen map:generate src=controller/demo.html type=controller-aware-string-template / map:serialize type=xml status-code=202 / /map:match /map:pipeline I included cocoon-sample-controller.xml : beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:p=http://www.springframework.org/schema/p; xmlns:aop=http://www.springframework.org/schema/aop; xmlns:context=http://www.springframework.org/schema/context; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd !-- Scan for all REST controllers and make them as beans available -- context:component-scan base-package=org.apache.cocoon.sample.controller use-default-filters=false name-generator=org.apache.cocoon.rest.controller.ControllerBeanNameGenerator scope-resolver=org.apache.cocoon.rest.controller.ControllerBeanScopeResolver context:include-filter type=annotation expression=org.apache.cocoon.rest.controller.annotation.RESTController / /context:component-scan context:annotation-config / bean id=org.apache.cocoon.sample.controller.aspect1 class=org.apache.cocoon.sample.controller.DemoRESTControllerAspect1 / bean id=org.apache.cocoon.sample.controller.aspect2 class=org.apache.cocoon.sample.controller.DemoRESTControllerAspect2 / /beans and cocoon-sample-servlet-service.xml: beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:servlet=http://cocoon.apache.org/schema/servlet; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd; !-- A Cocoon-Sitemap based servlet-service. -- bean id=org.apache.cocoon.sample.servlet class=org.apache.cocoon.servlet.XMLSitemapServlet here I am not sure if I did this the right way: servlet:context mount-path= context-path=jar:classpath:/WEB-INF/lib/cocoon-servlet-3.0.0-beta-1-SNAPSHOT!/webapp// /bean !-- A servlet-service that exposes JAX-RS REST endpoints. -- !-- bean id=org.apache.cocoon.sample.rest.servlet class=org.apache.cocoon.rest.jaxrs.container.CocoonJAXRSServlet servlet:context mount-path=/jax-rs context-path=jar:classpath:lib/${project.build.finalName}.jar!/COB-INF/ servlet:connections entry key=sample value-ref=org.apache.cocoon.sample.servlet / /servlet:connections /servlet:context property name=restResourcesList list ref bean=org.apache.cocoon.sample.rest.resource.one / ref bean=org.apache.cocoon.sample.rest.resource.two / /list /property /bean-- /beans in web.xml
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
On 07/23/2013 12:58 PM, Piratenvisier wrote: ... I get the error: java.net.MalformedURLException: unknown protocol: servlet at java.net.URL.init(URL.java:592) at java.net.URL.init(URL.java:482) at java.net.URL.init(URL.java:431) at org.apache.cocoon.rest.controller.response.URLResponse.init(URLResponse.java:49) at org.apache.cocoon.sample.controller.DemoRESTController.doGet(DemoRESTController.java:54) Not sure but seems that he cannot resolve: return new URLResponse(servlet:/controller/screen, data); When I went back to the original distribution without any changes and even when I try new URL(new URL(servlet:),servlet:/controller/screen) I get the same error,although I think that I once had success with the distribution. Hmm not sure, I just tried the samples and they work fine for me. cd ~/src/apache/c3/cocoon-sample svn up At revision 1506007. mvn clean install jetty:run http://localhost:/jax-rs/sample/parameter-passing/5?req-param=7 works fine. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 -- Thorsten Scherler scherler.at.gmail.com codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Am 23.07.2013 14:30, schrieb Thorsten Scherler: On 07/23/2013 12:58 PM, Piratenvisier wrote: ... I get the error: java.net.MalformedURLException: unknown protocol: servlet at java.net.URL.init(URL.java:592) at java.net.URL.init(URL.java:482) at java.net.URL.init(URL.java:431) at org.apache.cocoon.rest.controller.response.URLResponse.init(URLResponse.java:49) at org.apache.cocoon.sample.controller.DemoRESTController.doGet(DemoRESTController.java:54) Not sure but seems that he cannot resolve: return new URLResponse(servlet:/controller/screen, data); When I went back to the original distribution without any changes and even when I try new URL(new URL(servlet:),servlet:/controller/screen) I get the same error,although I think that I once had success with the distribution. Hmm not sure, I just tried the samples and they work fine for me. cd ~/src/apache/c3/cocoon-sample svn up At revision 1506007. mvn clean install jetty:run http://localhost:/jax-rs/sample/parameter-passing/5?req-param=7 works fine. Maybe this is the cause : When i try to install cocoon with maven I get the error Unable to initialise extensions Component descriptor role: 'com.jcraft.jsch.UIKeyboardInteractive', implementation: 'org.apache.maven.wagon.providers.ssh.jsch.interactive.PrompterUIKeyboardInteractive', role hint: 'default' has a hint, but there are other implementations that don't Because I am not able to install the whole application because of this error. But I see a strong tendenca to a programmed pipeline and I found myself even without cocoon on this way. see the pipeline example you can use cocoon-pipeline in you normal spring webapp (without cocoon servlet). However that seems pretty much as the sample block. Try just to start cocoon-rest-optional and do mvn clean install jetty:run I just added a small sample (I consider it quite clean) to use a pipeline in your java code. How should i call the Restcontroller from the browser and what result should I see ? cd ../cocoon-rest-optional #assuming you were in samples before mvn clean install jetty:run http://localhost:/ There are three different showcases, the last two ones are mail samples. Where Here comes the response from server... stands we will wait the response. I implement the whole thing with html5 and a bit of javascript to post to the server and update the response div with the server response. In case you have success it will read: Result: true while the request is processed you see Processing request In case of result: false check the logs in ./target/work/cocoon.log salu2 -- Thorsten Scherler scherler.at.gmail.com codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Thank you Thorsten for sending the MailSender example. I learnt one way to read out a bean could be a Controller based on a StringTemplateGenerator while a Restcontroller delivers the Bean.Do you know if there exists a Generator like the former JXGenerator Thanks for your help Am 20.07.2013 18:26, schrieb Thorsten Scherler (JIRA): [ https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thorsten Scherler closed COCOON3-129. - Resolution: Fixed Committed revision 1505158. Create an example to send a mail via cocoon --- Key: COCOON3-129 URL: https://issues.apache.org/jira/browse/COCOON3-129 Project: Cocoon 3 Issue Type: New Feature Components: cocoon-rest-optional Affects Versions: 3.0.0-beta-1 Reporter: Thorsten Scherler Fix For: 3.0.0-beta-1 http://markmail.org/message/6ces6erwekf57qfo as requested from hansheinrichbraun in above mail I extracted a simple example to send a mail with cocoon based on work of codebusters.es. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
On 07/22/2013 08:17 AM, Piratenvisier wrote: Thank you Thorsten for sending the MailSender example. I learnt one way to read out a bean could be a Controller based on a StringTemplateGenerator while a Restcontroller delivers the Bean.Do you know if there exists a Generator like the former JXGenerator Thanks for your help ATM the StringTemplateGenerator is the way, none has migrated the JXGenerator yet. Regarding the pipeline example it took me much longer then expected to extract the code since like I said it was based on a jms trigger and after 8 hours Saturday my kids requested to go swimming. I will have a look now to create a small pipe-example. Further for advanced mail operations you would need MimeMessageHelper message = new MimeMessageHelper(mimeMessage, true,UTF-8); which allows to * message.addAttachment(...) ; * message.setText(text, htmlString); // alternative formats text and html salu2 Am 20.07.2013 18:26, schrieb Thorsten Scherler (JIRA): [ https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thorsten Scherler closed COCOON3-129. - Resolution: Fixed Committed revision 1505158. Create an example to send a mail via cocoon --- Key: COCOON3-129 URL: https://issues.apache.org/jira/browse/COCOON3-129 Project: Cocoon 3 Issue Type: New Feature Components: cocoon-rest-optional Affects Versions: 3.0.0-beta-1 Reporter: Thorsten Scherler Fix For: 3.0.0-beta-1 http://markmail.org/message/6ces6erwekf57qfo as requested from hansheinrichbraun in above mail I extracted a simple example to send a mail with cocoon based on work of codebusters.es. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira -- Thorsten Scherler scherler.at.gmail.com codeBusters S.L. - web based systems consulting, training and solutions http://www.codebusters.es/
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
Thank you Thorsten don't spoil too much time for me. I think I need only some advice now. At the first glance cocoon 3.0 looks rather different than 2.2 I got fop and the SQLGenerator running. I try now the RestController. I will have a look at the normal Expession Language. in the StringTemplateGenerator Maybe it does the job. Am 22.07.2013 10:05, schrieb Thorsten Scherler: On 07/22/2013 08:17 AM, Piratenvisier wrote: Thank you Thorsten for sending the MailSender example. I learnt one way to read out a bean could be a Controller based on a StringTemplateGenerator while a Restcontroller delivers the Bean.Do you know if there exists a Generator like the former JXGenerator Thanks for your help ATM the StringTemplateGenerator is the way, none has migrated the JXGenerator yet. Regarding the pipeline example it took me much longer then expected to extract the code since like I said it was based on a jms trigger and after 8 hours Saturday my kids requested to go swimming. I will have a look now to create a small pipe-example. Further for advanced mail operations you would need MimeMessageHelper message = new MimeMessageHelper(mimeMessage, true,UTF-8); which allows to * message.addAttachment(...) ; * message.setText(text, htmlString); // alternative formats text and html salu2 Am 20.07.2013 18:26, schrieb Thorsten Scherler (JIRA): [ https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thorsten Scherler closed COCOON3-129. - Resolution: Fixed Committed revision 1505158. Create an example to send a mail via cocoon --- Key: COCOON3-129 URL: https://issues.apache.org/jira/browse/COCOON3-129 Project: Cocoon 3 Issue Type: New Feature Components: cocoon-rest-optional Affects Versions: 3.0.0-beta-1 Reporter: Thorsten Scherler Fix For: 3.0.0-beta-1 http://markmail.org/message/6ces6erwekf57qfo as requested from hansheinrichbraun in above mail I extracted a simple example to send a mail with cocoon based on work of codebusters.es. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
I have some problem getting the Restexample running: In the pom I have : dependency groupIdorg.apache.cocoon.pipeline/groupId artifactIdcocoon-pipeline/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.databases/groupId artifactIdcocoon-databases/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.sax/groupId artifactIdcocoon-sax/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.rest/groupId artifactIdcocoon-rest/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.stringtemplate/groupId artifactIdcocoon-stringtemplate/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.wicket/groupId artifactIdcocoon-wicket/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.optional/groupId artifactIdcocoon-optional/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.xmlgraphics/groupId artifactIdfop/artifactId version1.0/version /dependency dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-serializers-charsets/artifactId version${cocoon.serializers.charset.version}/version /dependency /dependencies my sitemap includes : map:pipeline map:match pattern=controller/{id}/{name} controller:call controller=rest-controller select=org.apache.cocoon.sample.controller.DemoRESTController map:parameter name=id value={map:id} / map:parameter name=name value={map:name} / /controller:call /map:match /map:pipeline map:pipeline type=noncaching map:match pattern=controller/screen map:generate src=controller/demo.html type=controller-aware-string-template / map:serialize type=xml status-code=202 / /map:match /map:pipeline I included cocoon-sample-controller.xml : beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:p=http://www.springframework.org/schema/p; xmlns:aop=http://www.springframework.org/schema/aop; xmlns:context=http://www.springframework.org/schema/context; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd !-- Scan for all REST controllers and make them as beans available -- context:component-scan base-package=org.apache.cocoon.sample.controller use-default-filters=false name-generator=org.apache.cocoon.rest.controller.ControllerBeanNameGenerator scope-resolver=org.apache.cocoon.rest.controller.ControllerBeanScopeResolver context:include-filter type=annotation expression=org.apache.cocoon.rest.controller.annotation.RESTController / /context:component-scan context:annotation-config / bean id=org.apache.cocoon.sample.controller.aspect1 class=org.apache.cocoon.sample.controller.DemoRESTControllerAspect1 / bean id=org.apache.cocoon.sample.controller.aspect2 class=org.apache.cocoon.sample.controller.DemoRESTControllerAspect2 / /beans and cocoon-sample-servlet-service.xml: beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:servlet=http://cocoon.apache.org/schema/servlet; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd; !-- A Cocoon-Sitemap based servlet-service. -- bean id=org.apache.cocoon.sample.servlet class=org.apache.cocoon.servlet.XMLSitemapServlet here I am not sure if I did this the right way: servlet:context mount-path= context-path=jar:classpath:/WEB-INF/lib/cocoon-servlet-3.0.0-beta-1-SNAPSHOT!/webapp// /bean !-- A servlet-service that exposes JAX-RS REST endpoints. -- !-- bean id=org.apache.cocoon.sample.rest.servlet class=org.apache.cocoon.rest.jaxrs.container.CocoonJAXRSServlet servlet:context mount-path=/jax-rs context-path=jar:classpath:lib/${project.build.finalName}.jar!/COB-INF/ servlet:connections entry key=sample value-ref=org.apache.cocoon.sample.servlet / /servlet:connections /servlet:context property name=restResourcesList list ref bean=org.apache.cocoon.sample.rest.resource.one / ref bean=org.apache.cocoon.sample.rest.resource.two / /list /property /bean-- /beans in web.xml the only part of importance is : context-param
Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
On 07/22/2013 12:17 PM, Piratenvisier wrote: I have some problem getting the Restexample running: In the pom I have : dependency groupIdorg.apache.cocoon.pipeline/groupId artifactIdcocoon-pipeline/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.databases/groupId artifactIdcocoon-databases/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.sax/groupId artifactIdcocoon-sax/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.rest/groupId artifactIdcocoon-rest/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.stringtemplate/groupId artifactIdcocoon-stringtemplate/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.wicket/groupId artifactIdcocoon-wicket/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.cocoon.optional/groupId artifactIdcocoon-optional/artifactId version${cocoon.version}/version /dependency dependency groupIdorg.apache.xmlgraphics/groupId artifactIdfop/artifactId version1.0/version /dependency dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-serializers-charsets/artifactId version${cocoon.serializers.charset.version}/version /dependency /dependencies my sitemap includes : map:pipeline map:match pattern=controller/{id}/{name} controller:call controller=rest-controller select=org.apache.cocoon.sample.controller.DemoRESTController map:parameter name=id value={map:id} / map:parameter name=name value={map:name} / /controller:call /map:match /map:pipeline map:pipeline type=noncaching map:match pattern=controller/screen map:generate src=controller/demo.html type=controller-aware-string-template / map:serialize type=xml status-code=202 / /map:match /map:pipeline I included cocoon-sample-controller.xml : beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:p=http://www.springframework.org/schema/p; xmlns:aop=http://www.springframework.org/schema/aop; xmlns:context=http://www.springframework.org/schema/context; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd !-- Scan for all REST controllers and make them as beans available -- context:component-scan base-package=org.apache.cocoon.sample.controller use-default-filters=false name-generator=org.apache.cocoon.rest.controller.ControllerBeanNameGenerator scope-resolver=org.apache.cocoon.rest.controller.ControllerBeanScopeResolver context:include-filter type=annotation expression=org.apache.cocoon.rest.controller.annotation.RESTController / /context:component-scan context:annotation-config / bean id=org.apache.cocoon.sample.controller.aspect1 class=org.apache.cocoon.sample.controller.DemoRESTControllerAspect1 / bean id=org.apache.cocoon.sample.controller.aspect2 class=org.apache.cocoon.sample.controller.DemoRESTControllerAspect2 / /beans and cocoon-sample-servlet-service.xml: beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:servlet=http://cocoon.apache.org/schema/servlet; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd; !-- A Cocoon-Sitemap based servlet-service. -- bean id=org.apache.cocoon.sample.servlet class=org.apache.cocoon.servlet.XMLSitemapServlet here I am not sure if I did this the right way: servlet:context mount-path= context-path=jar:classpath:/WEB-INF/lib/cocoon-servlet-3.0.0-beta-1-SNAPSHOT!/webapp// /bean !-- A servlet-service that exposes JAX-RS REST endpoints. -- !-- bean id=org.apache.cocoon.sample.rest.servlet class=org.apache.cocoon.rest.jaxrs.container.CocoonJAXRSServlet servlet:context mount-path=/jax-rs context-path=jar:classpath:lib/${project.build.finalName}.jar!/COB-INF/ servlet:connections entry key=sample value-ref=org.apache.cocoon.sample.servlet / /servlet:connections /servlet:context
[jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon
[ https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thorsten Scherler closed COCOON3-129. - Resolution: Fixed Committed revision 1505158. Create an example to send a mail via cocoon --- Key: COCOON3-129 URL: https://issues.apache.org/jira/browse/COCOON3-129 Project: Cocoon 3 Issue Type: New Feature Components: cocoon-rest-optional Affects Versions: 3.0.0-beta-1 Reporter: Thorsten Scherler Fix For: 3.0.0-beta-1 http://markmail.org/message/6ces6erwekf57qfo as requested from hansheinrichbraun in above mail I extracted a simple example to send a mail with cocoon based on work of codebusters.es. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira