Re: change data between java-action and html-pages
On Sun, 15 Dec 2002, Christoph Stocker wrote: hi! i have a java-action, which in every call say what's the next page and do some other data controlling. no i want to share the date, generated in my action, with my xsp-pages. whats the best way to share this date (in the session object?) is there another possibility, maybe a bean defined in the sitemap and can be filled in the action and read out in my xsp-pages. i don't want to use cookies!!! Why don't you use the request object than? Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: change data between java-action and html-pages
On Sun, 15 Dec 2002, Christoph Stocker wrote: hi! what i have forgotten is, that i want to store information over muliple pages and i thougth i can use a bean for this data-storing. Than use the session. Giacomo greetings, chris -Ursprüngliche Nachricht- Von: giacomo@lapgp [mailto:giacomo@lapgp] Im Auftrag von Giacomo Pati Gesendet: Sonntag, 15. Dezember 2002 17:29 An: [EMAIL PROTECTED] Betreff: Re: change data between java-action and html-pages On Sun, 15 Dec 2002, Christoph Stocker wrote: hi! i have a java-action, which in every call say what's the next page and do some other data controlling. no i want to share the date, generated in my action, with my xsp-pages. whats the best way to share this date (in the session object?) is there another possibility, maybe a bean defined in the sitemap and can be filled in the action and read out in my xsp-pages. i don't want to use cookies!!! Why don't you use the request object than? Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help on rolling my own XSL
Do you have a copy-over template in your logicsheet like: xsl:template match=@*|*|text()|processing-instruction() xsl:copy xsl:apply-templates select=@*|*|text()|processing-instruction()/ /xsl:copy /xsl:template Giacomo On Mon, 30 Sep 2002, Jerry Fowler wrote: Gentlefolk: I'm using the off-the-shelf Cocoon 2.0.3. I'm trying to roll my own xsp logicsheet, with an error result that I hope someone will recognize instantly: The constructed file, results_test_xsp.java, contains empty package line, and an empty class declaration, as follows: package ; ... /** * Generated by XSP. Edit at your own risk, :-) */ public class extends XSPGenerator { My keen nose and the Java parser tell me that the program generator should have inserted a package name and a class name in order to make this code mean anything. My grateful salute to anyone who can say off the top of the head why the generator chose to shortchange me. Below I provide the relevant portions of my xsp and my logicsheet if the clue above does not immediately ring a bell. I believe I have faithfully followed the guidelines on /cocoon/documents/userdocs/xsp/logicsheet.html, to wit, File results-test.xsp: -- ?xml version=1.0? ?xml-logicsheet href=file:///tmp/xeosql.xsl? xsp:page xmlns:xsl=http://apache.org/xsl; xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xeosql=http://xeotron.com/cocoon/SQL/v1; document body xsl:call-template name=xeosql:execute-query xsl:param name=tabletitle select='Results' / /xsl:call-template /body /document /xsp:page -- File xeosql.xsl: -- ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xeosql=http://xeotron.com/cocoon/SQL/v1; xmlns:xspdoc=http://apache.org/cocoon/XSPDoc/v1; xspdoc:desc Deliver data directly from an AIDIF /xspdoc:desc xsl:param name=XSP-ENVIRONMENT/ xsl:param name=XSP-VERSION/ xsl:param name=filename/ xsl:param name=language/ xsl:variable name=environmentCocoon 2/xsl:variable xsl:variable name=xsp-namespace-urihttp://apache.org/xsp/xsl:variable xsl:variable name=prefixxeosql/xsl:variable xsl:template match=xsp:page xsp:page xsl:apply-templates select=@*/ xsp:structure xsp:include.../xsp:include /xsp:structure xsl:apply-templates/ /xsp:page /xsl:template xsl:template name=xeosql:execute-query xsl:param name=tabletitle select='Results' / xsp:logic ... /xsp:logic /xsl:template !-- Allows initialization code to be executed exactly once. -- xsl:template match=xsp:page/*[not(self::xsp:*)] xsl:copy xsl:apply-templates select=@*/ xsp:logic // This code ends up inside populateDocument() before any user code /xsp:logic xsl:apply-templates/ /xsl:copy /xsl:template /xsl:stylesheet -- Many thanks, Jerry - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link Livesites: no longer
On 20 Aug 2002, Andreas Kuckartz wrote: This site listed as the second entry under Live Sites powered by Apache Cocoon seems to be a Zope site (and has some technical problems): Sirvisetti UDDI Registrar WAP site http://www.sirvisetti.com/uddihtml/uddi Thanks for the pointer. Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect/Rewrite Module
On Fri, 9 Aug 2002, Michael Wechner wrote: Hi I have a situation where I would like to do a lot of URI-redirects/rewrites. I know I can do this via the sitemap, but other people would be doing this. So for the reason of Separation of Concern I would like to separate this from the actual sitemap. My question is what are the possibilties to do something like that? -One way would probably be to have a separate sitemap dedicated to redirects, which is mounted by the actual sitemap. -Or to have the redirects in a separate file, which is pulled in by the actual sitemap as an external entity -Or to have an action/component, where every request is sent through and is acting as an redirect/rewrite module (and maybe calling Cocoon again!!) Any thoughts on this? What about redesigning your URI space? You know, I'm not a friend of redirects as they where made to keep old URIs still working if you had to restructure your site. It seems to me that people think redirection is a tool/pattern for web development. Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use Xindice in Cocoon2?
On Wed, 17 Jul 2002, sheshadri wrote: check for XMLDBTransformer regards, shesh - Original Message - From: Ken C To: [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 10:49 AM Subject: How to use Xindice in Cocoon2? I have been reading through the mail archive and can't find up-to-date mails on 'using xindice in Cocoon'. As the user guide suggests, both XML:DB Generator and XML:DB Collection Generator are gonna be deprecated. I am wondering how cocoon can communicate with xindice and what protocol I shall be using for that purpose. And would it be the same protocol for use in xsp and in a sitemap, if possible? The way to use XML DBs it is by an URL like xmldb:xindice://host/collection/resource IIRC. Giacomo Thanks in advance. PS. A summary of the problem and its solution will be provided, as suggested by the Cocoon developers and its community. And sorry for my poor english if it doesn't present clearly. -- Do You Yahoo!? Yahoo! Autos - Get free new car price quotes - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: To Admin - Important/Urgent/Serious
If you are shure you have subscribed using that mail address try mailto:[EMAIL PROTECTED] Giacomo PS request for help is mailto:[EMAIL PROTECTED] On Tue, 16 Jul 2002, Suchandra Nag wrote: same here .. Please someone help me to unsubscribe from the list .. My email_id is [EMAIL PROTECTED] Thanks in advance Suchandra SB wrote: I unsubscribed from this mail list and still geting mails. Again, I sent mail to [EMAIL PROTECTED] didnt get any response, probably my email is not in their database. So I subscribed again, and unsubscribed today. and I got mails from cocoon-users today too. After I unsubscribe, my mails dont seem to reach the list(as I didnt get my mail), but I *do* get all your mails. *So* I subscribed again and writing this mail. Why isnt there an email list *[EMAIL PROTECTED] ? Can some kind soul help? --st. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Cocoon 2.0.3 Release
Congrats to all! Cool work. I see I've missed alot according to the huge list of changes. Giacomo On Mon, 15 Jul 2002, Carsten Ziegeler wrote: Apache Cocoon 2.0.3 Released snipped-rest/ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Save output files
On Mon, 15 Jul 2002, Steven Noels wrote: Thomas Balthazar wrote: and i want to save the output (the html file) instead of simply viewing it with my browser. Can you please give me some clues. Cocoon offers a wonderful, if less-than-optimal documented command-line interface that crawls itself given a starting point URL. You can easily invoke this commandline interface using Ant or from a little batch file. If you want an example of this, check the 'build docs' target that comes with Cocoon, or have a look at Forrest which does the same thing. I don't immediately recall some location documenting all of its commandline option, as always there is the source code as a reference: sh ./run.sh --help Actually because of the automatic JVM recognition change recently the excalibur jars are not detected correctly in that script. You'll need to have a CLASSPATH setup that contains the appropriate jar (lib/core/jvmXXX/avalon-excalibur-vmXX-20020705.jar) Giacomo http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-cocoon2/src/java/org/apache/cocoon/Main.java?rev=HEADcontent-type=text/plain An example Ant target which invokes this behaviour, copied from Forrest build.xml: java classname=org.apache.cocoon.Main fork=true dir=${dir.containing.docs} failonerror=true arg value=-c./ arg value=-d../docs/ arg value=-w../work/ arg value=-l../work/cocoon.log/ arg value=-u${centipede.tools.cents.forrest.loglevel}/ arg value=index.html/ classpath path refid=classpath/ fileset dir=${build.dir} include name=*.jar/ /fileset fileset dir=${tools.dir} include name=*/lib/*.jar/ /fileset pathelement location=${tools.jar}/ pathelement location=${build.context}/WEB-INF/classes/ /classpath /java or check http://xml.apache.org/forrest/ HTH, /Steven - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Looking for help in the upcomming release
On Fri, 12 Jul 2002, Carsten Ziegeler wrote: Just an update to the procedure: If you use the latest CVS step 3 - setting the targetted jvm - is done now automatically by the build system. It detects the compiler version you use and chooses by itself the correct target. So, everything is getting easier. Nice work, Carsten. Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Confused about Logging
Quoting Jörn Heid [EMAIL PROTECTED]: [Using Cocoon 2.0.2 in Jetty 4.0.0 on Win 2000 with JDK 1.4] I have changed all log-level attributes in logkit.xconf and web.xml to FATAL-ERROR but every debug message is printed out into the four log files and on stdout. Is this a problem of 2.0.2 or Jetty? How can I generally turn out -ALL- messages? You have indeed choosen the right approach to eliminate DEBUG,INFO,WARN and ERROR message from cocoon. My system (Tomcat 4.0.1 and Cocoon pre 2.0.1-dev) *will* report FATAL_ERRORs only that way. Giacomo JOERN - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This mail sent through IMP: http://horde.org/imp/ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xsp while - for loop
Quoting Johannes Schwarz [EMAIL PROTECTED]: My xsp - file compiles without any problems. But as soon as I put a while or a for loop inside the method or inside the xsp:logic - tag within the tag NAVIGATION my xsp file won't compile anymore. It seems that it's going into an infinite loop. Did anybody else have that problem or at least a solution? Best regards J. Schwarz ?xml version=1.0 ? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:structure xsp:includejava.util.*/xsp:include xsp:includejava.io.*/xsp:include /xsp:structure xsp:logic String fileName=; public File getFileName() { fileName = parameters.getParameter(fileName,unknown); File back=null; try { back=new File(fileName); } catch (Exception e) { e.printStackTrace(); } return back; } /xsp:logic NAVIGATION xsp:logic for (int i=0;i5;i++) ^^^ Try using for (int i=0;i lt; 5;i++) as although it looks like java it is handled like xml and thus you have to use entities for , and . Giacomo ; //dosomething /xsp:logic /NAVIGATION /xsp:page - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is Cocoon good for???
Quoting Søren Neigaard [EMAIL PROTECTED]: Ok I'm a bit frustrated right now, but nothing I do works :( I have tried to deliver XML from my Java method to C2 as a stream of ASCII XML, as a string of ASCII XML, as a SAXSource and as a DOMSource. But to no avail. Yes I know that I probably havent done the last two attempts correctly, but I cant figure out how to do it, and I cant find any info that might help me, and the first two attempte should work according to the info I have found on Apache's C2 site (but it dont). Sorry, I can't help you out here (no experience). If I return a stream/string of ACSII XML data to C2, it works just fine on the first URL I call (no matter how many times i call it), but if I call another URL which doest EXCATLY the same as the first (same logicsheet, same namespace) it dosn't work. BUT If I had called the last URL first, it would have bene the one to work, and number one URL would fail!??? What is this?? Thats just impossible to work with :( Oh yes... Then there's the org.apache.cocoon.environment.Request. Whats that then?? Why not keep it as javax.servlet.http.HttpServletRequest so others can work with it without binding their code to C2. This is intentionally! The core Cocoon engine is not bound to the Servlet API, thus we introduced an abstract Environment to design a general Request/Response model. If we will bind Cocoon to the Servlet API the engine isn't easy portable to other environments like Commandline, Maillet, etc. Ok you guys, don't take this as a flame or anything like that. You have been super to help me, I'm just so damn tired off Cocoon, and I just neede to blow off some steam. I hope you feel better now :) It may sound stupid, but I really needed to send this mail, or I'm afraid I might go crazy :) Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wanted - C2 Idiots Guide to deploying XML/XSL/XSP files
Quoting Aston Jeremy [EMAIL PROTECTED]: Hi, I have just moved from c1.8 to c2b2 and am lost on how to deploy even the simplest of code under c2. I did have c2 running as a war under Tomcat 3.2.3 but now have got it running as an raw web app with Apache 1.3.19/mod_jk acting as the HTTP server and java interface (i.e. I've got the aliases and jkmount /cocoon/* ajp12 in my httpd.conf). This is so I can easily develop and add in my basic noddy code without having to repackage the war each time. All the samples work fine but even a basic xml page coded and copied under the cocoon webapp folder results in a page not found error. My research leaves me to believe that I need to add something to the sitemap file so that the file can be picked up but does this mean that *every* page needs to be in sitemap, even if it is in some kind of wild card arrangement? It appears that cocoon must be restarted to reloaded the changed sitemap - surely this is a ridiculous overhead in development time and prevents rapid code the page and test it that I am used to - even on C1.8. I basically understand what the sitemap is doing for the samples - it's just seems too long winded when all I want to do is create a folder and do a simple XML/XSL transformation. Am I missing something? What I need is an idiots guide to deploying a basic XML file right through to a basic XSP/Logicsheet/XML scenario. An idiots guide to working with the sitemap file would help as well - the alpha documentation does not contain sufficent examples at the moment. The main difference between C1 and C2 is that the definition of the processing steps is teared out of the individual xml pages into the sitemap. The thing is you have to group your pages you'd like to process by a single XSLT stylesheet. To achieve what you call code the page and test it use this simple sitemap snippet: map:match pattern=mygroup/*.html map:generate type=file src=mydir/{1}.xml/ map:transform type=xslt src=stylesheet/mygroup2html.xsl/ map:serialize type=html/ /map:match With this snipped a file anyfile.xml put into the mydir directory will be accessable by the url mygroup/anyfile.html and will by transformed by the stylesheet in stylesheet/mygroup2html.xsl. Hope this helps. Giacomo As an example - how do I deploy the basic XML/XSL file deployed in the XSP Guide chapter that is in the c2 doc set: Assume: The file path: c:\java\tomcat\webapps\cocoon\mystuff (on Win 2000 pro btw) The url I request: http://localhost/cocoon/mystuff/greeting.xml http://localhost/cocoon/mystuff/greeting.xml With my C1.8 knowledge I would have expected that I just create the folder and plop the files (greeting.xml and greeting.xsl) in there but it seems that the sitemap holds the key to these being served... Perhaps with a few pointers I can write the idiots guide but I need a little help myself first! Many thanks in advance Jez [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Logs? Error Pages?
Quoting [EMAIL PROTECTED]: Hi again, While I'm learning cocoon, the page cocoon returns most often is Document contains no data. My questions is: Is there any way at all of finding out what went wrong? Where are the error logs? -- the logs I can see do not contain any information about my errors. They are in webapps/cocoon/WEB-INF/logs Is it possible to have cocoon return an error page when there is an error, not just when tags are malformed, or something is improperly nested? Is this kind of error logging a development/deployment option? Yes, in the handle-error element in the sitemap. Giacomo I may have missed the point as I can't see any other messages asking about logs - obviously most people are getting appropriately detailed error messages when something goes wrong. Are there logs that tell you what went wrong during processing? Phil - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please tell me where the tags content/title/para/page are defined
Quoting Antony Stace [EMAIL PROTECTED]: Hi Folks I am very ner to cocoon, about 3 days and have a few questions. One of the example files in the cocoon distribution, simple.xsp Uses the tags, content title para page I cannot seem to find a style sheet which defines what these tags are. Where are they defined? Look at the sitemap.xmap! There is a map:match pattern=xsp/* which shows you where to find the stylesheet. Giacomo At the moment I am just serving this page with map:match pattern=testpage map:generate type=serverpages src=docs/samples/testpage.xsp/ map:serialize/ /map:match Can someone please tell me whats going on. Cheers Tony XXXSOURCE FILE FOLLOWSXXX ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:log=http://apache.org/xsp/log/2.0; page log:logger name=xsp-sample filename=xsp-sample.log/ log:debugProcessing the beginning of the page/log:debug titleA Simple XSP Page/title content paraHi there! I'm a simple dynamic page generated by XSP (eXtensible Server Pages)./para paraI was requested as the URI: bxsp-request:get-uri as=xml//b/para paraThe following list was dynamically generated:/para ul xsp:logic ![CDATA[ for (int i=0; i3; i++) { ]] li Item xsp:expri/xsp:expr /li ![CDATA[ } ]] /xsp:logic /ul xsp:element xsp:param name=namexsp:exprP.toLowerCase()/xsp:expr/xsp:param xsp:attribute name=alignleft/xsp:attribute i This paragraph was dynamically generated by logic embedded in the page /i /xsp:element para Request parameter name as XML: xsp-request:get-parameter name=name default=Not provided as=xml/ /para para Request parameter name as String: xsp-request:get-parameter name=name default=Not provided/ /para xsp-request:get-parameter-values name=name/ xsp-request:get-parameter-names/ para Header user-agent as XML: xsp-request:get-header name=user-agent as=xml/ /para para Header user-agent as String: xsp-request:get-header name=user-agent/ /para xsp-request:get-header-names/ paraBrought to you by Cocoon2 at xsp:exprnew Date()/xsp:expr./para /content log:debugProcessing the end of the page/log:debug /page /xsp:page - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action vs. Request
Quoting Tobias Luikard [EMAIL PROTECTED]: Hi, this isn't the problem. In the Action I try to set XMLString as seen. But when I try to read it in the XSP with the following statement it's empty (I get EGAL as result): xsp-request:get-parameter name=XMLString default=EGAL/ You are reading the Parameter XMLString not the Attribute. Giacomo When I call the pipeline in my Browser like: http://localhost:8080/cocoon/XMLDB_EVAL/XMLTest.html?TestString=ABCDEFG The ABCDEFG apperars in the XSP Site (in the response in the Web-Browser) but the System.out.println only prints null. So it seems there are different independent request objects. Any other hint? Tobias Christian Schmitt wrote: Hi, in your Action source code you are doing: request.setAttribute(XMLString, XMLString); ^ but then System.out.println(request.getAttribute(TestString)); ^^ May be that's the problem?! Hth, Christian On Mon, Sep 17, 2001 at 11:59:38AM +0200, Tobias Luikard wrote: Hi all, its me again. I tried to write a Action which adds a Attibute to the request. But somehow a different request is used. When I try to access a request attibute its null. When I add a attibute, its null in the XSP Site... Has anyone a hint? Thanks By Tobi P.S. I added my sitemap.xmap and the actor ?xml version=1.0? !-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Tobias Luikard (Exxcellent) -- map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; !-- === Components -- map:components map:generators default=file map:generator label=content name=file src=org.apache.cocoon.generation.FileGenerator/ map:generator label=content name=serverpages src=org.apache.cocoon.generation.ServerPagesGenerator/ /map:generators map:transformers default=xslt map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer use-storetrue/use-store use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db /map:transformer /map:transformers map:readers default=resource map:reader name=resource src=org.apache.cocoon.reading.ResourceReader/ /map:readers map:serializers default=html map:serializer name=links src=org.apache.cocoon.serialization.LinkSerializer/ map:serializer mime-type=text/xml name=xml src=org.apache.cocoon.serialization.XMLSerializer/ map:serializer mime-type=text/html name=html src=org.apache.cocoon.serialization.HTMLSerializer/ /map:serializers map:selectors default=browser/ map:matchers default=wildcard map:matcher name=wildcard src=org.apache.cocoon.matching.WildcardURIMatcherFactory/ /map:matchers map:actions default=XMLProducer map:action name=XMLProducer src=de.exxcellent.cocoon.acting.XMLActionTest/ /map:actions /map:components !-- === Pipelines = -- map:pipelines map:pipeline map:match pattern= map:redirect-to uri=ot.html/ /map:match map:match pattern=ot.html map:generate src=ot.xml/ map:transform src=ot.xsl/ map:serialize/ /map:match map:match pattern=XMLTest.html map:act type=XMLProducer map:generate type=serverpages src=XMLTest.xsp/ map:serialize type=xml/ /map:act /map:match /map:pipeline /map:pipelines /map:sitemap !-- end of file -- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ
RE: embedding fonts (FOP and C2)
Quoting Jacob Cantwell [EMAIL PROTECTED]: thanks Giacomo and Colin, i went through the logs again, and picked up that it wasnt finding the font. (i swear it wasn't in the logs before) in my sitemap: user-config src=d:/fop/conf/userconfig.xml/ in my userconfig.xml: font metrics-file=FZZQJW.xml kerning=yes embed-file=FZZQJW.ttf the relative path to the metrics-file and embed-file actually points to my D:\jakarta-tomcat-3.2.2\bin directory which is odd. i moved the files there and it works for my .pfb fonts, i have to do more testing with .ttf fonts though. should i write up a blurb for http://xml.apache.org/cocoon2/pdf-serializer.html about this topic? i would like to contribute to cocoon's documentation in some way. Sure, cool. Maybe we can convice the Fop community to have a way to define a base dir fop looks for those files. Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon2 + SSL.
Wrong list, Please post to tomcat-users Giacomo Quoting [EMAIL PROTECTED]: I use Tomcat with Cocoon2. But now i need SSL. I've tried with tomcat but i can't. Someone can tell me how to do it properly. I've done all with tomcat papers but it doesn't work well. Some questions: 1) is 8443 is the port to get into.? 2) How can i access to ssl ? https://myhost:8443 or 8080 ( is the port i use in tomcat ). 3) where may i deploy my cert ? thanx in advance. José Blas. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to log from a Java class ?
Quoting Cyril Cambien [EMAIL PROTECTED]: I understand how to log from a xsp file using the log.xsl logicsheet but what is the best way to log information from the Java classes called from my xsp files ? Make them implement Loggable and pass the logger to them xsp:logicyourClassInstance.setLogger(getLogger());/xsp:logic Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon2 and HP Web Services Platform
Quoting Ovidiu Predescu [EMAIL PROTECTED]: Hi, I just wanted to let you know you can now take a look at HP Web Services Platform (HPWS), which includes a modified version of Cocoon2, as I presented in one the recent emails on cocoon-dev: http://www.hp.com/go/webservices For those of you who have not read the thread of discussion on cocoon-dev ([C2] [2.1-dev] proposed changes to the Source interface), here is a quick introduction. HP, through the Web Services Organization (which I'm part of), is making use of Cocoon2 as _the_ framework for accessing and building Web Services. I always knew that Cocoon2 _is_ the web service platform from the day I proposed to have a logic components called Action even if its current implementation isn't everybodies darling :) As part of the HPWS product, we are actively supporting and enhancing Cocoon2 to suit the needs of Web Services. We are using Cocoon2 to implement business level protocols like ebXML, BizTalk, RosettaNet RNIF, and others. While HPWS is a commercial solution, very much based on Cocoon2, we do plan to incorporate back in the open source all the changes we make to Cocoon2's source code. Sounds very cool and of course you're very welcome. In this release of HPWS, Cocoon2 contains some initial support for accessing Web Services via SOAP. The specific enhancements contain a SOAP and UDDI logicsheet, both developed on top of some powerful abstractions, which I hope to integrate in the C2 main trunk very soon. We have a version running that is able to communicate with SOAP clients as well as normal browsers by an abstraction we call Connectors (implemented as Actions). The Connectors responsability is to accept the client request and transform it into an abstraction so that every client protocol can use the very same service code. The counterpart of Connectors are Responders (implemented as XSP pages and ev. XSLT) that knows the client protocol to transform the abstracted response object to. You can take a look at the changes we've done in the source package that's included with the release. Unfortunately there isn't much documentation on this framework yet, but you can follow the thread of discussions in cocoon-dev mentioned above. Hopefully the complete solution, updated to use the today's Cocoon2 2.1-dev source code, will become available soon. I'm really thrilled by the possibility we have to work with such a great community of Cocoon2 developers and users. If you have any specific questions or concerns please let us know and we'll try to answer them. Yes, i'm proud to be part as well :) Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using action return value in xsp
Quoting Michael Homeijer [EMAIL PROTECTED]: In an action i return a HashMap to the sitemap, one of the elements in this HashMap is a HashMap. My question is, how do I get this second HashMap in an xsp page. From the documentation of the Parameters object, I read that I can only get string parameters from it. How can I pass complex objects from an action to an xsp page? Put those object into the request like request.setAttribute(name, map) and read them in your XSP page like request.getAttribute(name); Giacomo TIA, Michael - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Implementing FileExistSelector
Quoting Michael Homeijer [EMAIL PROTECTED]: In a part of the sitemap I want to check if a requested file exists, if it doesn't i want to return the contents of a default file. Is this the way I should implement something like that or are the easier methods? : map:match pattern=annotation\* map:select type=fileexists map:parameter name=filename value=annotation\{1}/ map:when test=fileexists map:generate src=annotation\{1}/ /map:when map:otherwise map:generate src=annotation\default.xml/ /map:otherwise /map:select map:transform src=annotation.xsl/ /map:match This might be one approach. Another one could be with an Action like this: map:match pattern=annotation/* map:act type=fileexists src=annotation/{1} map:parameter name=default value=annotation/default.xml/ map:generate src={the-file}/ /map:act map:transform src=annotation.xsl/ /map:match the mentioned Action will check for the file and return a Map containing the-file as the key and the filename as its value depending on the existance test (either the value of the source attribute or of the parameter default). Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [C2] SOAP - Scanned for virus
Quoting Michael Homeijer [EMAIL PROTECTED]: Hi, If you mean the stuff I sent to the mailing list: it ended up in the cvs bij mistake. They were just meant as an example to show what could be done with soap. In my opinion, an implementation of soap in C2 should not just be a logicsheet, but an extra channel in the interface with cocoon (both serving soap requests and performing soap requests on other servers). This way it should be easier to implement xml based services in a cocoon application instead of only xml based publishing. I think Giacomo has some great ideas on the subject. You can also check my previous posts on the subject. We had to write a C2 app that is able to serve SOAP clients as well as browsers so the approach we've take is that we've put the application logic into beans that are XML'izable themselfs (I've mentioned our toolkit to produce the beans in another mail earlier). The way we do it is that we have ConnectorActions that sits on top of the different URIs to accept the requests. So we ended up with a SOAPConnectorAction and a HttpConnectorAction. The responsability they have is simply build a bean that represents the request either out of the SOAP message of from the GET/POST. This bean is simply used as a Command that is processed by other components/Actions before the final response bean is created. This response bean is depending on the requesting client xml'ized down the pipeline by a BeanSOAPGenerator (very simple) for the SOAP client or processed in an XSP page to present the content together with aggregated stuff (header, navbar, footer, etc.) for the browser clients. Giacomo Greetings, Michael Homeijer -Original Message- From: Berin Loritsch [mailto:[EMAIL PROTECTED]] Sent: vrijdag 13 juli 2001 21:50 To: [EMAIL PROTECTED] Subject: Re: [C2] SOAP - Scanned for virus Drasko Kokic wrote: Berin, Who is the maintainer of the SOAP addition to C2.1 ? Is it possible to extract SOAP part out of the C2.1 and try to make it working on C2.0? I need to implement it rather soon and could just about wait for C2.0 to be released (C2.1 would probably be far too late). I'm not sure. Cocoon 2.1 is simply the same as Cocoon 2.0 with some extra stuff. Try just pulling 2.1 from CVS, and extract what you need. TIA Drasko --- Berin Loritsch [EMAIL PROTECTED] wrote: Drasko Kokic wrote: Uli, have you thought about redesigning the SOAP taglib (logicsheet?) so that it is portable to C2? I would need to have it running fairly soon and am ready to put in some eforts :-) With regards to the auth taglib, I would still suggest that you look into the RequestIntercepter implementation of the Context Based Security spec. It is 100% portable (between C1 and C2 of course :-) I believe the CVS for Cocoon 2.1 has SOAP support using the Axis jar. You may want to verify It was included in Cocoon 2.1 due to its newness and it not being tested yet. As to the Context Based Security spec, do you have a URL? I am interested in looking at it. Drasko --- Uli Mayring [EMAIL PROTECTED] wrote: On Wed, 11 Jul 2001, Berin Loritsch wrote: I think you may already be used to not getting the output stream in Cocoon 1. In Cocoon1 it is actually possible to get the OutputStream, I'm using that in my soap taglib. My auth taglib makes heavy use of redirects (such as redirecting you to the login page, if you try to access a protected page and have not authenticated). So these two taglibs, which I use a lot in my Cocoon1 apps, are not portable to Cocoon2. Back when XSP taglibs first appeared, it was said that their advantage is that implementations can change, the interface remains the same. Of course now that XSP itself works differently, this advantage is gone. It's always a trade-off between backwards compatibility and new features. I'm sorry to hear that the XSP model was not deemed fit to last across different versions of Cocoon - I wonder if it will change again for Cocoon3. Perhaps the answer lies elsewhere: implement XSP as an Avalon block, add some parts of Tomcat, Xerces and Xalan as blocks and I won't need Cocoon anymore to build web applications. That's the beauty of OpenSource, that these things are possible. The objects you seek are all in the Map objectModel passed in to your pages. for XSP, the Request, Context, and Response objects are stored as class variables. Through them, you can get your Session and Cookie objects as usual. other than sendRedirect and getting a reference to the output stream, nothing should be hidden from you. Ok, thanks
Re: Servlet generator, help needed
Quoting Jean-Marc Borer [EMAIL PROTECTED]: Hello guys, I am new to Cocoon, but not to web application development and XML. We are currently evaluating Cocoon to see if it fits out needs. We develop web applications based on servlets. In a MVC (model view controller) model, we expect to use servlets as controllers, Cocoon for the view and we have our own database layer for the model. Our servlets are responsible to produce the XML (from information extracted of the database) and tranmit it to the Cocoon pipeline for the rendition. However our static pages will be written in XML and processed by Cocoon in the usual way. What is the best way to implement this? Subclass the ServletGenerator class and build our owns? No, Cocoon was not build to be used that way. Best is you rewrite your servlet as Actions and put it at the begining of your pipeline definitions in the sitemap. Giacomo Thanks in advance for any help. Cheers, Jean-Marc Borer Solution center Engineer InfoDesign Communications - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ./build.sh - permission denied
Quoting raghu [EMAIL PROTECTED]: Hello there, I am unable to build the cocoon2, i downloaded the cocoon-2.0-b1.tar from xml.apache.org, and untarred it in a directory. When i try to build using ./build.sh -Dinclude. i get permission denied, why is it so i am in the root while doing this. Can anybody help. Pleas. bye, raghu Use 'sh ./build.sh -Dinclude. ' Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [C2] Newbie question again
Quoting Aleksey Globets [EMAIL PROTECTED]: Ok, I will try to ask in another way. If I plan to create two contexts in Tomcat pointed to different directories and to use Cocoon within it. So how I can use it? Do I need to copy and rename /cocoon directory or something else? Yes. Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2 and Avalon
Quoting Ulrich Mayring [EMAIL PROTECTED]: Hi folks, now that the beta is out, what is the relation of Cocoon2 and Avalon? We already use Avalon here for other stuff, can we just install Cocoon as a block or do we still need Tomcat? So far C2 is not a Block. You still need Tomcat (IIRC Tomcat 4 can be build as a Block). The relation to Avalon is that C2 uses the framework and excalibur. Giacomo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Problem starting up new C2 beta
Quoting Alexander Weinmann [EMAIL PROTECTED]: I am quite sure that I don't have any duplicate versions of avalon or other jars in the classpath. If still think it is a general problem with the avalon/excalibur jars included in the dist. ... Though: If others DO NOT have the problem, It must be may local installation ... So: Did somebody manage to start up C2beta as it comes out of the box from the download directory? Yes, I can confirm that the C2 beta 1 is running out of the box on a NT box with Tomcat 4 (current cvs) Giacomo -Ursprüngliche Nachricht- Von: Fred Tsang [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 7. Juni 2001 11:42 An: '[EMAIL PROTECTED]' Betreff: RE: Problem starting up new C2 beta Hi Alexander, take a look at the following forwarded email response from Berin Loritsch at Apache. If you have the same setup as me, this should do the trick: == Fred Tsang wrote: Sorry, My environment is: Tomcat 3.2.1 JDK 1.3.1 Solaris 8 I've placed all the jar files from WEB-INF/lib into my $TOMCAT_HOME/lib folder, and removed any duplicates from previous versions. I'll try removing the avalon jars from the lib folder, but I'm a little skeptical. If cocoon can't find the classes, how will it operate? thanks for the tip! That was your whole problem! Cocoon 2 is designed to work like servlets are supposed to work: plug and play. COCOON 1 TO COCOON 2 MIGRATION Cocoon 1 forces you to place all the jars in the Tomcat lib directory, this was unnavoidable at the time but it was because of XSP compilation. Cocoon 2 discovered how to be able to compile XSP without moving the jars out of the servlet context lib directory. 1) Remove all unnecessary/conflicting jars from $TOMCATH_HOME/lib 2) Replace $TOMCAT_HOME/lib/{xerces/parser jar} with the version of Xerces that comes with Cocoon 2. 3) LEAVE ALL COCOON 2 JARS IN ${context}/WEB-INF/lib cheers, Fred -Original Message- From: Alexander Weinmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 9:06 AM To: Cocoon-Users (E-Mail) Subject: Problem starting up new C2 beta Hello Cocooners! I am getting back an old problem when starting up the new C2 beta distribution: Package Naming problems in Avalon: In the log I have: ERROR 1201[cocoon ] (Thread-24): Error compiling sitemap java.lang.NoClassDefFoundError: org/apache/avalon/logger/AbstractLoggable at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.avalon.excalibur.component.DefaultComponentFactory. newInstance(De faultComponentFactory.java:83) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandl er.initialize( ThreadSafeComponentHandler.java:78) at org.apache.avalon.excalibur.component.DefaultComponentSelector .addComponent( DefaultComponentSelector.java:306) at org.apache.cocoon.components.language.generator.GeneratorSelec tor.addGenerat or(GeneratorSelector.java:75) at org.apache.cocoon.components.language.generator.GeneratorSelec tor.addGenerat or(GeneratorSelector.java:71) at org.apache.cocoon.components.language.generator.GeneratorSelec tor.select(Gen eratorSelector.java:57) at org.apache.cocoon.components.language.generator.ProgramGenerat orImpl.select( ProgramGeneratorImpl.java:261) at org.apache.cocoon.components.language.generator.ProgramGenerat orImpl.load(Pr ogramGeneratorImpl.java:145) at org.apache.cocoon.sitemap.Handler.run(Handler.java:224) at java.lang.Thread.run(Thread.java:484) I am quite sure that the class name should be org/apache/avalon/framework/logger/AbstractLoggable Is it sure that the Avalon and Excalibur jars included in the dist work well together? abaXX TECHNOLOGY AG Alexander Weinmann Development Engineer Training [Address] Forststrasse 7, 70174 Stuttgart, Germany [Phone] +49-(711)-61-41-6 - 1541 [Fax] +49-(711)-61-41-6 - [E-mail] mailto:[EMAIL PROTECTED] [Internet] http://www.abaXX.com http://www.abaxx.com/ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]