RE: ressource reader bug with IE (linked to caching)
Hello, Finally, I found one solution. You only have to add expires parameter for the map:read as follow : map:read src="" mime-type=application/msword map:parameter name=expires value=100/ /map:read This seems to force IE to bypass the error obtained on the first call to the document. This is not the better solution but it's working, without to write a specific servlet or modify actual reader component as mentionned in previous suggestions. Nevertheless, I obtain twice the following WARN message when accessing PDF documents (not with DOC) but hte document is correctly accessed : == WARN!! Invalid length: Content-Length=98945 written=3138 for http://localhost:/test.pdf WARN!! Invalid length: Content-Length=98945 written=3138 for http://localhost:/test.pdf One other interesting and recent relative link I found on the subject is : http://archives.real-time.com/pipermail/cocoon-users/2004-February/046611.html This initial problem should be keept in a todo list. Regards. Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Subject: RE: ressource reader bug with IE (linked to caching) Date: Tue, 20 Apr 2004 16:08:22 +0200 Thread-Topic: ressource reader bug with IE (linked to caching) Thread-Index: AcQmx4QjKjOUIwcMQsayGi5C8Qfj2wAGMvYA From: Carmona Perez, David [EMAIL PROTECTED] To: [EMAIL PROTECTED] X-OriginalArrivalTime: 20 Apr 2004 14:08:22.0768 (UTC) FILETIME=[F0CC7F00:01C426E0] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I detected the same problem and posted to Bugzilla, with a patch, taken from Cocoon 2.0.4 which didn't have this bug. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24647 Hope this helps. -Mensaje original- De: Joel Reungoat [mailto:[EMAIL PROTECTED]] Enviado el: martes, 20 de abril de 2004 13:05 Para: [EMAIL PROTECTED] Asunto: ressource reader bug with IE (linked to caching) Hello users, I'm trying to access DOC or PDF files using the ressource reader component as described in the sitemap below and get the following error only under Microsoft IE : Internet Explorer cannot download test.doc from localhost Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. This message also only appears at the first attempt. It seems that at first attempt, the file has been prepared in the cache. So, if I refresh the page a second time from IE, I get and open correctly my document under Word (or Acrobat if pdf). When using Mozilla navigator, there is no problem at first attempt. Also, if a first attempt is made from Mozilla, then the first attempt from IE is working. So it seems that Cocoon caching is implicated. I made a test in the sitemap by forcing noncaching for the pipeline. And then, I can not access at all to my document. Does anybody have a solution for this problem ? My cocoon version : 2.1.4 My IE version : 5.5 (probably problems also with 6.0) IE configaration for caching page : automatic (other choice produces same problem) Other links I found without answers : http://www.mail-archive.com/[EMAIL PROTECTED]/msg07949.html http://www.mail-archive.com/[EMAIL PROTECTED]/msg04959.html Here is my sitemap : ?xml version=1.0 encoding=UTF-8? map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0 map:pipelines map:pipeline type=caching !-- With caching, the problem occurs only at the first read -- !-- map:pipeline type=noncachingWithout caching, the problem occurs at each attempt -- map:match pattern=**.doc map:read src="" mime-type=application/msword/ /map:match map:match pattern=**.pdf map:read src="" mime-type=application/pdf/ /map:match /map:pipeline /map:pipelines /map:sitemap * Este correo ha sido procesado por el Antivirus del Grupo FCC. * * Este correo ha sido procesado por el Antivirus del Grupo FCC. *
Re: Dynamic , individual xsl generation
Dear Joerg, Thanks for the reply. What's the input, what iscomplex, where is the data stored and so on Input is in the form of xml which is generated at run time whose structure is known.We have around 300 forms with different layouts. Part of a report will be in 2 column layout and the next part can be in 3 column layout. We only need a solution for print ready pdf reports since the input from is in html. ( We have already haveclasses to generate xml from the input data ). Now we are keeping separate style sheets for each report with some namingconventions and link them at run time wth the xml string to produce pdf using FOP APIs. We are looking a way to avoid keeping individual style sheets for each and every report.What we have in mind is to have a Database Schema to store the xsl fo layout information and wirte Java Classes which will glue the pieces together. Is there a much elegant way to do this thing using coccoon and few style sheets ? Some reports are very complex and i am now in a search to find a DB schema to store the layout information . Can you guide me to some links or resouces regarding this issue ? Expecting your reply, thanks and regards, -- Kannan - Original Message - From: Joerg Heinicke Date: Sat, 10 Apr 2004 14:58:50 +0200 To: [EMAIL PROTECTED] Subject: Re: Dynamic , individual xsl generation On 10.04.2004 11:48, Kannan V wrote: Dear All, I have a project ( jsp and sevlets ) in which I am using xml and xslt to generate very complex reports.Althogther there are about 300 reports. I am using one xsl file for data input page and another for print ready report. ( html only ). So I have to store 600 xsl files for 300 reports !!. One stylesheet for each page is indeed not handable. We started our first Cocoon project with this approach - but with far less than 300 stylesheets, maybe 25. For current projects we only use one stylesheet that fits all. The input must be more structured then of course. I am trying to replace this framework with cocoon and fop ( for print ready pdf ). Is it possible to generate complex, individual reports using cocoon dynamically ? That is , I want to avoid storing the style shhets statically in the server. ( instead, have as database design to store the xsl-fo information for each report ) If there are any cocoon gurus around, please reply about the feasibility of this project. ( which framework to use like jsp , xsp.. Yes, Cocoon sounds perfect for this job. For details some more information is probably needed. What's the input, what is complex, where is the data stored and so on. For pure data retrieval XSP might be sufficient (ESQL [1]). I would not recommend JSP for low support reasons. Joerg [1] http://cocoon.apache.org/2.1/userdocs/xsp/esql.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ___ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Transofrmer from Invalid HTML to XHTML or XML
Dear Members, I have some HTML with special characters as nbsp; IMG that I want to save as valid XML or XHTML. Is there a way to do that ? Thanks for your help
Re: Transofrmer from Invalid HTML to XHTML or XML
[EMAIL PROTECTED] wrote: Dear Members, I have some HTML with special characters as nbsp; IMG that I want to save as valid XML or XHTML. Look at the HTMLGenerator in the HTML block. Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAVA 1.3.1
Hello. Please help me with: Could I compile and run cocoon 2.1.4 with java 1.3.1? If yes how could I do it. If no, which version of the cocoon supports java 1.3.1? Thank you for answer. regards Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAVA 1.3.1
grofcik.lan wrote: Hello. Please help me with: Could I compile and run cocoon 2.1.4 with java 1.3.1? If yes how could I do it. If no, which version of the cocoon supports java 1.3.1? All versions of Cocoon should work with Java 1.3.1. There was a recent find of some code that didn't compile, but that was then fixed. Try it, and report back if you find anything that doesn't work. Alternatively, you could try the version from CVS, which has the fixes in place. Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URLEncoding of special characters
You have to configure the serializer encoding like in this sample: map:serializer name=xml-iso logger=serializ.xml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/xml encodingISO-8859-1/encoding /map:serializer -Mensaje original- De: news [mailto:[EMAIL PROTECTED] nombre de Harald Wehr Enviado el: jueves, 22 de abril de 2004 8:35 Para: [EMAIL PROTECTED] Asunto: URLEncoding of special characters I have a problem concerning special german characters occuring in urls. I made a minimal example to show my problems. Assume following pipeline snippet: map:match pattern=SpecialCharacters.html map:generate type=file src=context://content/test1.xml/ map:serialize type=html/ /map:match The test1.xml looks like this. Please consider the special german characters in the url (hope the are displayed correctly in your mail client): ?xml version=1.0 encoding=iso-8859-1 ? html head titleTest/title /head body a href=ÜTest.htmlÜTest/a a href=ÄTest.htmlÄTest/a /body /html The HTML-Serializer encodes the urls to following output (source code of HTML file): !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 titleTest/title /head body a href=%C3%9CTest.htmlUuml;Test/a a href=%C3%84Test.htmlAuml;Test/a /body /html So the Ü is encoded to %C3%9C and Ä to %C3%84 but I need %DC for Ü and %C4 for Ä. The java.net.URLEncoder.encode method brings the following: System.out.print(java.net.URLEncoder.encode(ÜÄ,UTF-8)); Result: %C3%9C%C3%84 System.out.print(java.net.URLEncoder.encode(ÜÄ,ISO-8859-1)); Result: %DC%C4 So why does the serializer does this UTF-8 url encoding? In the web.xml I set the container-encoding and form-encoding parameters to ISO-8859-1 without any changes. Serializer is the defined the following way in the sitemap: map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer doctype-public-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer Can you give me any hints how I get the url correctly encoded? (need it for further database lookups). Cocoon: Dev-Snapshot from 2004-03-29 Java: 1.4.2_03 Thanks for your help Harald -- Institut für Tourismus- und Geo-Informationssysteme GmbH Sitz: Friedrichstrasse 57-59 38855 Wernigerode Büro: Gießerweg 5 38855 WernigerodeWeb: http://www.itgis.com Tel: 03943/557807 Fax: 03943/557808 Das Internet-Lexikon - Ein Dienst der ITGIS GmbH: http://www.knowlex.org Privat: http://www.harald-wehr.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * Este correo ha sido procesado por el Antivirus del Grupo FCC. * * Este correo ha sido procesado por el Antivirus del Grupo FCC. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Flowscript - removeSession() is not a function
Hi, I am getting the following error message in my flowscript: org.apache.avalon.framework.CascadingRuntimeException: removeSession is not a function, with the following line of code: cocoon.removeSession(); I know that to create a session in flowscript I do cocoon.createSession(). Could someone tell me what the correct syntax is to destroy a session in flowscript is? Peter
Re: URLEncoding of special characters
On 22.04.2004 08:35, Harald Wehr wrote: I have a problem concerning special german characters occuring in urls. The HTML-Serializer encodes the urls to following output (source code of HTML file): a href=%C3%9CTest.htmlUuml;Test/a a href=%C3%84Test.htmlAuml;Test/a So the Ü is encoded to %C3%9C and Ä to %C3%84 but I need %DC for Ü and %C4 for Ä. The java.net.URLEncoder.encode method brings the following: System.out.print(java.net.URLEncoder.encode(ÜÄ,UTF-8)); Result: %C3%9C%C3%84 System.out.print(java.net.URLEncoder.encode(ÜÄ,ISO-8859-1)); Result: %DC%C4 So why does the serializer does this UTF-8 url encoding? AFAIK this is the correct behaviour, URLs are UTF-8 encoded. In the web.xml I set the container-encoding and form-encoding parameters to ISO-8859-1 without any changes. This has no influence on the serialization at all. Serializer is the defined the following way in the sitemap: map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer doctype-public-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer This influences the encoding of the pages as you expect it, but not of URLs. I also would like to get it confirmed with a spec, but until now I didn't find it. Can you give me any hints how I get the url correctly encoded? (need it for further database lookups). Don't use URLs, but forms. They are encoded as expected and can be read correctly. This is why the parameter in cocoon.xconf is also called form-encoding. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Transofrmer from Invalid HTML to XHTML or XML
Hej, I have some HTML with special characters as nbsp; IMG that I want to save as valid XML or XHTML. if you need the XML outside the pipeline (e.g. store to xml database) you can also use HTML Tidy. There is a free port available for Java: http://sourceforge.net/projects/jtidy/ Use the XHTML option if you want to receive pure XML data. PHILIPP BURKERT [EMAIL PROTECTED] http://www.burkert.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Flowscript - removeSession() is not a function
cocoon.session.invalidate() ? John beyaNet Consultancy wrote: Hi, I am getting the following error message in my flowscript: org.apache.avalon.framework.CascadingRuntimeException: removeSession is not a function, with the following line of code: cocoon.removeSession(); I know that to create a session in flowscript I do cocoon.createSession(). Could someone tell me what the correct syntax is to destroy a session in flowscript is? Peter -- - Jentro Technologies GmbH John L. Webber, Software Development - Rosenheimer Str. 145e 81671 München Tel. +49 89 189 169 80 mailto:[EMAIL PROTECTED] Fax +49 89 189 169 99 http://www.jentro.com - NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems wirh session logicsheet
Try to remove your whitespaces and the ; : xsp-session:set-attribute name=utilisateurJoseph/xsp-session -- Olivier bremerj wrote: I have a problem (see attached error message) when trying to execute the following piece of code. xsp-session:set-attribute name=utilisateur Joseph /xsp-session:set-attribute; Anybody an idea of what might be the problem? Thanks, Joseph BREMER iCube Consulting 33, rue du Kiem, Bte 13 L-8030 Strassen Luxembourg Tel: +352 021 221 427 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems wirh session logicsheet
Many thanks, Joseph iCube Consulting 33, rue du Kiem, Bte 13 L-8030 Strassen Luxembourg Tel: +352 021 221 427 -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Olivier Billard Sent: jeudi 22 avril 2004 13:27 To: [EMAIL PROTECTED] Subject: Re: Problems wirh session logicsheet Try to remove your whitespaces and the ; : xsp-session:set-attribute name=utilisateurJoseph/xsp-session -- Olivier bremerj wrote: I have a problem (see attached error message) when trying to execute the following piece of code. xsp-session:set-attribute name=utilisateur Joseph /xsp-session:set-attribute; Anybody an idea of what might be the problem? Thanks, Joseph BREMER iCube Consulting 33, rue du Kiem, Bte 13 L-8030 Strassen Luxembourg Tel: +352 021 221 427 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to deploy Cocoon 2.1.4 to WebSphere 5.0.2.4
Hello, I am new in the cocoon. Could somebody help me with: How to deploy cocoon 2.1.4 to WebSPhere 5.0.2.4? I tried to I compiled Cocoon in SUN jdk 1.3.1_11 and made cocoon.war. I was able to deploy it into Tomcat an JBoss. I then tried to deploy it with WebSphere Administrative Console setting: Classloader Mode to PARENT_LAST WAR Classloader Policy to Module. I also set Web Modules - cocoon.war - Classloader Mode to PARENT_LAST. I obtained an errors: found this in websphere\appserver\logs\server1\SystemOut.log [4/22/04 14:18:49:641 CEST] 3d6f876a WebGroup I SRVE0180I: [cocoon.war] [/cocoon] [Servlet.LOG]: Cocoon: init [4/22/04 14:18:49:875 CEST] 3d6f876a ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet Cocoon: javax.servlet.ServletException: org/apache/xindice/client/xmldb/DatabaseImpl at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:99) Begin backtrace for Nested Throwables java.lang.NoClassDefFoundError: org/apache/xindice/client/xmldb/DatabaseImpl at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java(Compiled Code)) at org.apache.cocoon.components.source.impl.XMLDBSourceFactory.configure(XMLDBS ourceFactory.java:112) at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil. java:239) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De faultComponentFactory.java:305) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize( ThreadSafeComponentHandler.java:143) at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponen t(ExcaliburComponentSelector.java:738) at org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedCom ponentSelector.java:268) at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil. java:239) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De faultComponentFactory.java:305) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize( ThreadSafeComponentHandler.java:143) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal iburComponentManager.java:312) at org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentMa nager.java:324) at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServ iceManager.java:106) at org.apache.excalibur.source.impl.SourceResolverImpl.service(SourceResolverIm pl.java:171) at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.ja va:181) . The class org/apache/xindice/client/xmldb/DatabaseImpl is already present in xindice-1.1b3.jar Thank you for answer Regards Roderik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
?cocoon-format type=text/html in html-file
Hi, I have a problem with PI ?cocoon-format type=text/html appearing in resulting html-file as first line: ?cocoon-format type=text/html html xmlns:xsp=http://www.apache.org/1999/XSP/Core; head ... Some browsers don't accept it. I saw the FAQ hint Why doesn't xsl:output work? dealing with this topic. But the link to #lostpis is broken. I use Cocoon 2.1.3, Tomcat 4.1.29 and Sun Java SDK 1.4.2_02. sitemap: map:match pattern=start.xml map:generate src=start.xml type=serverpages/ map:transform src=start.xsl/ map:serialize type=html/ /map:match Does anyone know how to avoid this first line? Thanks Ingrid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jpath transformer
Hi, could someone please inform me as to the correct usage of the jpath transformer. Can I use it as I would an xslt transformer and and declare a *.jpath file, which like its xsl counterpart, would handle styling issues? For example, could I do the following: map:match pattern=frame/*/*/*> map:generate type=serverpages src=xsp/{1}.xsp> map:parameter name=artistID value={3}/> /map:generate> map:transform type=jpath src=style/{2}.jpath/> map:call resource=serialize/> /map:match> If so, does anyone have examples of a jpath transformation file I could have a look at? And if you can declare an jpath transformation file, how can I get objects and variables from my flowscript into it? Peter
Re: ?cocoon-format type=text/html in html-file
this looks like some old cocoon1 stuff. look into start.xsl, you will find something like: xsl:processing-instruction name=cocoon-formattype=text/html/xsl:processing-instruction/ remove this line. hth, Frank - Original Message - From: Ingrid Nagel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 2:45 PM Subject: ?cocoon-format type=text/html in html-file Hi, I have a problem with PI ?cocoon-format type=text/html appearing in resulting html-file as first line: ?cocoon-format type=text/html html xmlns:xsp=http://www.apache.org/1999/XSP/Core; head ... Some browsers don't accept it. I saw the FAQ hint Why doesn't xsl:output work? dealing with this topic. But the link to #lostpis is broken. I use Cocoon 2.1.3, Tomcat 4.1.29 and Sun Java SDK 1.4.2_02. sitemap: map:match pattern=start.xml map:generate src=start.xml type=serverpages/ map:transform src=start.xsl/ map:serialize type=html/ /map:match Does anyone know how to avoid this first line? Thanks Ingrid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Runtime problems with FOM - using samples
I'm having problems with using Eclipse with the Cocoon sources (v2.1.4 and a nightly build from last week). Using the standard build and cocoon servlet works fine but when Eclipse compiles runs the code I get the following error in the standard fom_system.js when using the Calculator sample: function FOM_WebContinuation() { [native code] } is not a function. org.apache.avalon.framework.CascadingRuntimeException: function FOM_WebContinuation() { [native code] } is not a function. cause: TypeError: function FOM_WebContinuation() { [native code] } is not a function. (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system. js; line 19) stacktrace org.apache.avalon.framework.CascadingRuntimeException: function FOM_WebContinuation() { [native code] } is not a function. at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpret er.callFunction(FOM_JavaScriptInterpreter.java:707) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invo ke(CallFunctionNode.java:130) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. invokeNodes(AbstractParentProcessingNode.java:49) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i nvoke(PreparableMatchNode.java:130) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. invokeNodes(AbstractParentProcessingNode.java:72) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P ipelineNode.java:126) I'm using: Cocoon v2.1.4 (or 2.1.5-dev) Eclipse v3.0.0 Build 200403261517 (M8) Jetty Any ideas? John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jpath transformer
Hi, could someone please inform me as to the correct usage of the jpath transformer. Can I use it as I would an xslt transformer and and declare a *.jpath file, which like its xsl counterpart, would handle styling issues? For example, could I do the following: map:match pattern=frame/*/*/*> map:generate type=serverpages src=xsp/{1}.xsp> map:parameter name=artistID value={3}/> /map:generate> map:transform type=jpath src=style/{2}.jpath/> map:call resource=serialize/> /map:match> If so, does anyone have examples of a jpath transformation file I could have a look at? And if you can declare an jpath transformation file, how can I get objects and variables from my flowscript into it? Peter
AW: ?cocoon-format type=text/html in html-file
Hi Frank, thanks a lot. I didn't see this aold instruction. Ingrid -Ursprüngliche Nachricht- Von: Frank Taffelt [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 22. April 2004 15:00 An: [EMAIL PROTECTED] Betreff: Re: ?cocoon-format type=text/html in html-file this looks like some old cocoon1 stuff. look into start.xsl, you will find something like: xsl:processing-instruction name=cocoon-formattype=text/html/xsl:processing-instruction/ remove this line. hth, Frank - Original Message - From: Ingrid Nagel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 2:45 PM Subject: ?cocoon-format type=text/html in html-file Hi, I have a problem with PI ?cocoon-format type=text/html appearing in resulting html-file as first line: ?cocoon-format type=text/html html xmlns:xsp=http://www.apache.org/1999/XSP/Core; head ... Some browsers don't accept it. I saw the FAQ hint Why doesn't xsl:output work? dealing with this topic. But the link to #lostpis is broken. I use Cocoon 2.1.3, Tomcat 4.1.29 and Sun Java SDK 1.4.2_02. sitemap: map:match pattern=start.xml map:generate src=start.xml type=serverpages/ map:transform src=start.xsl/ map:serialize type=html/ /map:match Does anyone know how to avoid this first line? Thanks Ingrid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sax event stream corruption, concurrency bug in 2.1.4?
Just wondering if anyone else has experienced something similar in production, under load, using Cocoon 2.1.4. We're finding that every once in a while a sax event stream seems to get corrupted. A user may end up with the XML from another user's session, or the wrong snippet of XML from their own session. Other times we get a Stack Overflow exception out of the XML parser, but again, it is infrequent and we have had trouble replicating the problem. Seems to be a concurrency issue from the smell of the symptoms. We're not sure if it's in Cocoon, Avalon, Caching or somewhere else. We're trying to set up replicable test environment, but as of yet have not succeeded. Anyone else seen anything like this? Thanks for any/all help that might point me in the right direction. Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session Handling: Unlimited Session duration
Hi! For my application I need an unlimited session. The users should never login a second time if they once did it. I use the Cocoon authentication framework to control the users access. How can I set an unlimited session duration even if the user closes his browser? I tried it with cocoon.session.setMaxInactiveInterval(-1) within my login function directly after the authentication. The Cocoon docs under http://cocoon.apache.org/2.1/userdocs/flow/api.html#Session+Object says ... A negative time indicates the session should never timeout.. But if I close my browser and reopen it I have to authenticate again. Why? Is there something to do in the servlet environment? Or must I force cookie session handling? And if yes, how can I do this? Thanks for any help. Greetings, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SVN information?
-BEGIN PGP SIGNED MESSAGE-Hash: SHA1 Good morning: I was looking for information about the svn repository for Cocoon andcouldn't find anything on the website. The only information aboutcommitts I did find talks about CVS and the mail archives don'tmention SVN at all as far as cocoon is concerned. So my questionsare: 1. Is Cocoon using SVN or CVS for repo control?2. Is using SVN, where are the docs to configure svn for it? Thanks,Carlos -BEGIN PGP SIGNATURE-Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBQIfW2V1sel0NpjckEQI+mgCgm2QuaZMjzsFiPQuF2nFVbPSPCJYAn1S1Jul5CuLAM/XInEtqEHGJqRiy=btOD-END PGP SIGNATURE-
Re: Session Handling: Unlimited Session duration
Markus Heussen wrote: Hi! For my application I need an unlimited session. The users should never login a second time if they once did it. I use the Cocoon authentication framework to control the users access. How can I set an unlimited session duration even if the user closes his browser? I tried it with cocoon.session.setMaxInactiveInterval(-1) within my login function directly after the authentication. The Cocoon docs under http://cocoon.apache.org/2.1/userdocs/flow/api.html#Session+Object says ... A negative time indicates the session should never timeout.. But if I close my browser and reopen it I have to authenticate again. Why? Is there something to do in the servlet environment? Or must I force cookie session handling? And if yes, how can I do this? There's a difference between 'timeout' of a session and 'loss'. Closing and reopening the browser will always create a new session. That's just how sessions work. What I think you need to do is store a cookie on the client's browser, and use that to log the user back in automatically when they come in without a session. I'm not sure of what the effect on memory is of switching the session timeout off - your servlet container might then hold on to sessions forever, and could run out of memory. I'd suggest you leave the session timeout as is, and just use a persistent cookie to relog them in if the session does die. Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVN information?
Carlos Araya wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Good morning: I was looking for information about the svn repository for Cocoon and couldn't find anything on the website. The only information about committs I did find talks about CVS and the mail archives don't mention SVN at all as far as cocoon is concerned. So my questions are: 1. Is Cocoon using SVN or CVS for repo control? 2. Is using SVN, where are the docs to configure svn for it? It is using CVS. See installing page on site for more info. We have just started discussing possibly migrating to SVN. Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session Handling: Unlimited Session duration
Thanks Upayavira for your hints :-) I will do it like you said. Markus -Original Message- From: Upayavira Sent: Thursday, April 22, 2004 4:33 PM To: [EMAIL PROTECTED] Subject: Re: Session Handling: Unlimited Session duration Markus Heussen wrote: Hi! For my application I need an unlimited session. The users should never login a second time if they once did it. I use the Cocoon authentication framework to control the users access. How can I set an unlimited session duration even if the user closes his browser? I tried it with cocoon.session.setMaxInactiveInterval(-1) within my login function directly after the authentication. The Cocoon docs under http://cocoon.apache.org/2.1/userdocs/flow/api.html#Session+Objec t says ... A negative time indicates the session should never timeout.. But if I close my browser and reopen it I have to authenticate again. Why? Is there something to do in the servlet environment? Or must I force cookie session handling? And if yes, how can I do this? There's a difference between 'timeout' of a session and 'loss'. Closing and reopening the browser will always create a new session. That's just how sessions work. What I think you need to do is store a cookie on the client's browser, and use that to log the user back in automatically when they come in without a session. I'm not sure of what the effect on memory is of switching the session timeout off - your servlet container might then hold on to sessions forever, and could run out of memory. I'd suggest you leave the session timeout as is, and just use a persistent cookie to relog them in if the session does die. Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Running Cocoon from CD
Hello everyone! I just try to set up Tomcat(4.0.6) + Cocoon (2.0) to run from CD. Tomcat works perfectly fine but cocoon won't work as it tries to write some files (WEB-INF\db\commondb.*) to the CD. Is there a way to avoid this? Are there any further problems that might appear? I am not using database services, only XML+XSLT - HTML. Regards, Michael -- NEU : GMX Internet.FreeDSL Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Cocoon from CD
Hi, Configure Cocoon+Tomcat to use a TEMP directory on the hard-drive and everything should work fine. Michael Faschinger wrote: Hello everyone! I just try to set up Tomcat(4.0.6) + Cocoon (2.0) to run from CD. Tomcat works perfectly fine but cocoon won't work as it tries to write some files (WEB-INF\db\commondb.*) to the CD. Is there a way to avoid this? Are there any further problems that might appear? I am not using database services, only XML+XSLT - HTML. Regards, Michael -- Ivo Limmen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Cocoon from CD
hi .. this is an interest thread can i make some questions? Tomcat and cocoon need a JVM what happend if the client machine does not have JVM already installed? i have make some tries puting a JVM in the CD with tomcat and cocoon. the startup string set path and java_home just before start the container jetty in my case. But in this approach i have to know the letter assigned to CDROM drive (win) have u make this work using a diff way? --stavros On Thu, 22 Apr 2004, Ivo Limmen wrote: Hi, Configure Cocoon+Tomcat to use a TEMP directory on the hard-drive and everything should work fine. Michael Faschinger wrote: Hello everyone! I just try to set up Tomcat(4.0.6) + Cocoon (2.0) to run from CD. Tomcat works perfectly fine but cocoon won't work as it tries to write some files (WEB-INF\db\commondb.*) to the CD. Is there a way to avoid this? Are there any further problems that might appear? I am not using database services, only XML+XSLT - HTML. Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Cocoon from CD
Hi Tomcat and cocoon need a JVM what happend if the client machine does not have JVM already installed? i have make some tries puting a JVM in the CD with tomcat and cocoon. the startup string set path and java_home just before start the container jetty in my case. But in this approach i have to know the letter assigned to CDROM drive (win) have u make this work using a diff way? I followed the instructions on http://www.torsten-horn.de/techdocs/jsp-tomcat-cd.html Unfortunately (for you), they're all german. The essential part for you should be in the StartTomcat.bat: rem Start Tomcat set CLASSPATH= set JAVA_HOME=%__ActToolRootPath__%\..\Java set CATALINA_HOME=%__ActToolRootPath__%\..\Tomcat call %CATALINA_HOME%\bin\startup.ba If you have any further questions relating this document, I can translate the relevant parts from german into german english for you ;-) HTH, Michael -- NEU : GMX Internet.FreeDSL Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xhtml:p
I have cocoon powering my website, which is working beautifully. I am now attempting to use Lenya for content management. However, the html for Lenya comes out weird.All of the outputed tags include xhtml: for example instead of p it outputs xhtml:p Any ideas of what I can do to fix this. Thanks, Kirk Storer - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xhtml:p
On Thu, 22 Apr 2004 [EMAIL PROTECTED] wrote: I have cocoon powering my website, which is working beautifully. I am now attempting to use Lenya for content management. However, the html for Lenya comes out weird.All of the outputed tags include xhtml: for example instead of p it outputs xhtml:p Hmmm, this is probably caused by the serializer you are using. Which serializer are you using and what is its configuration. Also, what version of cocoon, lenya, xerces, and xalan are you using? -- JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xhtml:p
Not sure exactly what the versions are. All of the invloved software was obtained via the new newest binaries of cocoon and lenya that were available a few months ago. The configuration is and serializer are all the defaults that came with the binary distributions. Thanks On Thu, 22 Apr 2004 [EMAIL PROTECTED] wrote: I have cocoon powering my website, which is working beautifully. I am now attempting to use Lenya for content management. However, the html for Lenya comes out weird.All of the outputed tags include xhtml: for example instead of p it outputs xhtml:p Hmmm, this is probably caused by the serializer you are using. Which serializer are you using and what is its configuration. Also, what version of cocoon, lenya, xerces, and xalan are you using? -- JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Transofrmer from Invalid HTML to XHTML or XML
Dear Upayavira, this is not a question of generator but more a question of serializer I think Upayavira [EMAIL PROTECTED] 22/04/2004 10:42 Please respond to users To: [EMAIL PROTECTED] cc: Subject: Re: Transofrmer from Invalid HTML to XHTML or XML [EMAIL PROTECTED] wrote: Dear Members, I have some HTML with special characters as nbsp; IMG that I want to save as valid XML or XHTML. Look at the HTMLGenerator in the HTML block. Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing parameters to aggregation parts
Hi, In my sitemap a have the following code fragment: map:aggregate element="page" map:part src="" strip-root="false"/ map:part src="" strip-root="false" map:parameter name="user_id" value="{1}"/ map:parameter name="app_id" value="{2}"/ /map:part/map:aggregate When I try to access the "user_id" and "app_id" inside the XSP file the values are null, but I know that the values are not null. I never see an example of passing parameters to the parts of an aggregation, but it seems to make sense. Thanks in advance, Carlos Dias
Re: Transofrmer from Invalid HTML to XHTML or XML
[EMAIL PROTECTED] wrote: Dear Upayavira, this is not a question of generator but more a question of serializer I think Well, what you want to do is use the HTMLGenerator to read in the HTML, and then serialize it as XML or as XHTML. You can't serialize HTML directly, as you can't use it within a pipeline because it isn't valid XML. Therefore you convert it to valid XML with the HTMLGenerator, then serialize it. Hope that makes sense. Upayavira *Upayavira [EMAIL PROTECTED]* 22/04/2004 10:42 Please respond to users To:[EMAIL PROTECTED] cc: Subject:Re: Transofrmer from Invalid HTML to XHTML or XML [EMAIL PROTECTED] wrote: Dear Members, I have some HTML with special characters as nbsp; IMG that I want to save as valid XML or XHTML. Look at the HTMLGenerator in the HTML block. Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing parameters to aggregation parts
Carlos Dias wrote: Hi, In my sitemap a have the following code fragment: map:aggregate element=page map:part src=conf/reportmenu.xml strip-root=false/ map:part src=cocoon:/select_bookmark_list.xsp strip-root=false map:parameter name=user_id value={1}/ map:parameter name=app_id value={2}/ /map:part /map:aggregate When I try to access the user_id and app_id inside the XSP file the values are null, but I OTTOMH : did you try value=../{1} and value=../{2} ? Jorg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[portal] Using bookmarks for named-items' urls
Hi, I keep running into problems using default navigation provided with tabs via @parameter for named-items. Instead I'd like to use bookmarks (I find that using bookmarks only works more consistently). Now, I've tried adding my own parameter like: named-item parameter name=bookmark value=homepage/ ... However, it seems that portal is ignoring it, so I can't pick it up in my stylesheet: xsl:for-each select=named-item !-- THIS DOES NOT WORK, bookmark is n/a -- xsl:variable name=uri select=@bookmark/ ... Any ideas? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Cocoon from CD
Hi, Configure Cocoon+Tomcat to use a TEMP directory on the hard-drive and everything should work fine. that's right what I wanted to do, but where do I set these parameters? Thanks, regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing parameters to aggregation parts
Jorg, Thanks for the answer, but still doesn't work!! CDias - Original Message - From: Jorg Heymans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 6:35 PM Subject: Re: Passing parameters to aggregation parts Carlos Dias wrote: Hi, In my sitemap a have the following code fragment: map:aggregate element=page map:part src=conf/reportmenu.xml strip-root=false/ map:part src=cocoon:/select_bookmark_list.xsp strip-root=false map:parameter name=user_id value={1}/ map:parameter name=app_id value={2}/ /map:part /map:aggregate When I try to access the user_id and app_id inside the XSP file the values are null, but I OTTOMH : did you try value=../{1} and value=../{2} ? Jorg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean as datasource
Craig Christophersen wrote: Hello; I need to be able to use an Entity bean (or other object) as a datasource rather than using a direct connection to the database or a file. Any info on setting that up would be helpful. Thanks, Craig Christophersen Software Developer (406)533-6750 [EMAIL PROTECTED] Hello, the BetwixtTransformer may help you to marshal entity beans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Cocoon from CD
On 22.04.2004 17:02, Michael Faschinger wrote: Hello everyone! I just try to set up Tomcat(4.0.6) + Cocoon (2.0) to run from CD. Tomcat works perfectly fine but cocoon won't work as it tries to write some files (WEB-INF\db\commondb.*) to the CD. Is there a way to avoid this? Are there any further problems that might appear? I am not using database services, only XML+XSLT - HTML. Regards, Michael With Cocoon 2.0 you have to configure Cocoon yourself. You have to remove the configuration of the databases from the cocoon.xconf. It's probably better to use 2.1 as there you can select and deselect the blocks you don't need. Is it possible for you to switch to 2.1? Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[FLOW] Bug in cookie handling?
Hi! Is there a known bug in the Cocoon cookie handling within a flowscript? I created a cookie using cocoon.response.addCookie(cocoon.response.createCookie(test, test)); and tried to get it from the request doing the following: 1. cocoon.log.debug(cocoon.request.getCookies()); -- Lorg.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon$FOM_Cookie;@187 6e5d 2. cocoon.log.debug(cocoon.request.getCookies()[0].name); -- test 3. cocoon.log.debug(cocoon.request.getCookies()[0].getName()); -- org.apache.avalon.framework.CascadingRuntimeException: getName is not a function The docs under http://cocoon.apache.org/2.1/userdocs/flow/api.html#Cookie+Object says that there is a method getName(). Or am I missunderstanding something? I'm using a few weeks old CVS Head under Tomcat 4.1 and Java 1.4.2. Greetings, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Components, hibernate, etc. (was Re: Access servlet context attribute: how?)
Revisiting this after a few weeks... :-) On Mar 31, 2004, at 11:48 PM, Jean-Christophe Kermagoret wrote: Mark Lundquist wrote: OK, so I would like to pass a parameter in to my Cocoon application via a context attribute (because I can set that in my Jetty configuration file). How do I access a context attribute from within one of my Java classes? Thx-a-lot, mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Mark, have you tried something like that ? It's a javascript code but java code is almost the same. /** * Example : * getContextValue(authentication,/authentication/ID); * getContextValue(authentication,/authentication/role); * getContextValue(authentication,/authentication/data/user); **/ function getContextValue(contextPath, path) { var contextMan = cocoon.getComponent(Packages. org.apache.cocoon.webapps.session.ContextManager.ROLE); var context = contextMan.getContext(contextPath); return context.getXML(path).getTextContent(); } That's all great, except that it all depends on the FOM. In plain old Java I don't have cocoon.getComponent(). I know the answer should be simple: to be a client of ContextManager, just be an Avalon component that implements Serviceable, then you get your ServiceManager from service() and you can call lookup(org.apache.cocoon.webapps.session.ContextManager.ROLE) on it. But I'm having trouble figuring out how to get this solution to fit with what I've got... My domain objects are all written as plain old regular Java classes, with flowscript gluing them to the sitemap. To give a little context... the class that needs to be able to access a servlet context attribute is factory for Hibernate sessions, and the attribute is an instance name for the application that will be used to derive a JNDI path for the datasource, to be passed to the Hibernate configuration. The factory has static methods to get/create and close an associated resource (a ThreadLocal hibernate Sesssion). So, turning this factory into an Avalon component just pushes my problem back one level, because now how do the factory's clients access it? As POPOs they have no ServiceManager and are unable to look up the factory component, just as the factory component had been unable to look up ContextManager when it was POJ! BTW I have zero experience with Avalon components (or any other kind for that matter)... I suppose the right way to have done my project would have been to use components from the get-go, but that would have been just beyond the level of learning curve for me to tolerate at the time. So, how do I solve this problem? I could use a singleton, which seems way hacky... any ideas? thx, mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Components, hibernate, etc. (was Re: Access servlet context a ttribute: how?)
Revisiting this after a few weeks... :-) On Mar 31, 2004, at 11:48 PM, Jean-Christophe Kermagoret wrote: Mark Lundquist wrote: OK, so I would like to pass a parameter in to my Cocoon application via a context attribute (because I can set that in my Jetty configuration file). How do I access a context attribute from within one of my Java classes? Thx-a-lot, mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Mark, have you tried something like that ? It's a javascript code but java code is almost the same. /** * Example : * getContextValue(authentication,/authentication/ID); * getContextValue(authentication,/authentication/role); * getContextValue(authentication,/authentication/data/user); **/ function getContextValue(contextPath, path) { var contextMan = cocoon.getComponent(Packages. org.apache.cocoon.webapps.session.ContextManager.ROLE); var context = contextMan.getContext(contextPath); return context.getXML(path).getTextContent(); } That's all great, except that it all depends on the FOM. In plain old Java I don't have cocoon.getComponent(). I know the answer should be simple: to be a client of ContextManager, just be an Avalon component that implements Serviceable, then you get your ServiceManager from service() and you can call lookup(org.apache.cocoon.webapps.session.ContextManager.ROLE) on it. But I'm having trouble figuring out how to get this solution to fit with what I've got... My domain objects are all written as plain old regular Java classes, with flowscript gluing them to the sitemap. To give a little context... the class that needs to be able to access a servlet context attribute is factory for Hibernate sessions, and the attribute is an instance name for the application that will be used to derive a JNDI path for the datasource, to be passed to the Hibernate configuration. The factory has static methods to get/create and close an associated resource (a ThreadLocal hibernate Sesssion). So, turning this factory into an Avalon component just pushes my problem back one level, because now how do the factory's clients access it? As POPOs they have no ServiceManager and are unable to look up the factory component, just as the factory component had been unable to look up ContextManager when it was POJ! BTW I have zero experience with Avalon components (or any other kind for that matter)... I suppose the right way to have done my project would have been to use components from the get-go, but that would have been just beyond the level of learning curve for me to tolerate at the time. So, how do I solve this problem? I could use a singleton, which seems way hacky... any ideas? One solution that has been proposed on this list before is to create a simple Avalon component that implements Serviceable. Then give this component a static method called getServiceManager(). Now any POJO can get a ServiceManager and use it to retrieve any other components it wants. thx, mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cocoon.dat in cache-dir keeps growing ?
Hi, currently our new website built on Cocoon (2.1.4. with Tomcat 5.0.19 on Linux) is 3 weeks in production. Everything is running smoothly accept for one problem: Appareantly the cocoon.dat file keeps growing. It is currenty 95 MB (!) and it seems to keep growing at +/- 15 MB per week. The cocoon.idx file is currently 800 Kb Anyone any idea how I can control whether this is normal ? Where can I find more information regarding the working of the cache ? I'm surprised that it is 95 MB for our website as our website is not that big at all . I have the impression that somehow the cache keeps growing ? Is this normal behavior and should the files regularly be deleted ? Regards Stefan
Re: Passing parameters to aggregation parts
what does your map:match look like? Carlos Dias wrote: Jorg, Thanks for the answer, but still doesn't work!! CDias - Original Message - From: Jorg Heymans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 6:35 PM Subject: Re: Passing parameters to aggregation parts Carlos Dias wrote: Hi, In my sitemap a have the following code fragment: map:aggregate element=page map:part src=conf/reportmenu.xml strip-root=false/ map:part src=cocoon:/select_bookmark_list.xsp strip-root=false map:parameter name=user_id value={1}/ map:parameter name=app_id value={2}/ /map:part /map:aggregate When I try to access the user_id and app_id inside the XSP file the values are null, but I OTTOMH : did you try value=../{1} and value=../{2} ? Jorg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Components, hibernate, etc. (was Re: Access servlet context attribute: how?)
Il giorno 22/apr/04, alle 22:15, Mark Lundquist ha scritto: I know the answer should be simple: to be a client of ContextManager, just be an Avalon component that implements Serviceable, then you get your ServiceManager from service() and you can call lookup(org.apache.cocoon.webapps.session.ContextManager.ROLE) on it. But I'm having trouble figuring out how to get this solution to fit with what I've got... If alll you need is to be able to get a ServiceManager from a POJO, try this: public class MyComp implements Serviceable { private ServiceManager manager; public void public void service(ServiceManager manager) { this.manager = manager; } public ServiceManager getManager() { return manager; } Then in your flowscript: var comp = cocoon.createObject(MyComp); // Do all that you want with comp.manager Hope this helps. Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cocoon.dat in cache-dir keeps growing ?
Title: Message Hi There, What version of the store are you using? JISP, or JCS? I know there is a JCS issue similar to this. Let me know :) Corin -Original Message-From: Stefan Geelen [mailto:[EMAIL PROTECTED] Sent: Friday, 23 April 2004 8:47 a.m.To: [EMAIL PROTECTED]Subject: cocoon.dat in cache-dir keeps growing ? Hi, currently our new website built on Cocoon (2.1.4. with Tomcat 5.0.19 on Linux) is 3 weeks in production. Everything is running smoothly accept for one problem: Appareantly the cocoon.dat file keeps growing. It is currenty 95 MB (!) and it seems to keep growing at +/- 15 MB per week. The cocoon.idx file is currently 800 Kb Anyone any idea how I can control whether this is normal ? Where can I find more information regarding the working of the cache ? I'm surprised that it is 95 MB for our website as our website is not that big at all . I have the impression that somehow the cache keeps growing ? Is this normal behavior and should the files regularly be deleted ? Regards Stefan CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz
Re: Bean as datasource
Thank you toto, and thank you Upayavira as well. Here is a bit more detail. After looking at the BetwixtTransformer I don't think it fits my needs because what I will get in an EJB or other object will be well formed xml, as a String. Where I am hung up is how to get that as the src in a generator. Is Castor the way to go? If so, does anyone have any examples. Another option might be for me to write a servlet to use as the src which handles getting the bean string. Anyway, I guess one main question is if I have the xml as a string, how can I put it into a generator? Craig - Original Message - From: toto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 1:26 PM Subject: Re: Bean as datasource Craig Christophersen wrote: Hello; I need to be able to use an Entity bean (or other object) as a datasource rather than using a direct connection to the database or a file. Any info on setting that up would be helpful. Thanks, Craig Christophersen Software Developer (406)533-6750 [EMAIL PROTECTED] Hello, the BetwixtTransformer may help you to marshal entity beans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean as datasource
Craig Christophersen wrote: Thank you toto, and thank you Upayavira as well. Here is a bit more detail. After looking at the BetwixtTransformer I don't think it fits my needs because what I will get in an EJB or other object will be well formed xml, as a String. Where I am hung up is how to get that as the src in a generator. Is Castor the way to go? If so, does anyone have any examples. Another option might be for me to write a servlet to use as the src which handles getting the bean string. Anyway, I guess one main question is if I have the xml as a string, how can I put it into a generator? Look at the JXTemplateGenerator. Using flow, you can do cocoon.sendPage(url, {object::object}; which will make your object available within your template. I believe you can get it to parse an XML string too, but I can't remember how I'm afraid. Regards, Upayavira - Original Message - From: toto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 1:26 PM Subject: Re: Bean as datasource Craig Christophersen wrote: Hello; I need to be able to use an Entity bean (or other object) as a datasource rather than using a direct connection to the database or a file. Any info on setting that up would be helpful. Thanks, Craig Christophersen Software Developer (406)533-6750 [EMAIL PROTECTED] Hello, the BetwixtTransformer may help you to marshal entity beans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Sitemap] auth-protect action - bug or feature?
Hi all! If I call my following protected pipeline the result is a 404 page not found error. I thought the right behavior is to redirect automatically to the login resource?? Is it a bug or am I doing something wrong? I am using Cocoon from the few days old CVS Head under SDK1.4.2 and TC 4.1.30. Thanks for helping, Markus map:match type=wildcard pattern=secure/** map:act type=auth-protect map:parameter name=handler value={global:handler}/ !-- logout function -- map:match type=wildcard pattern=secure/logout map:call function=logout map:parameter name=handler value={global:handler}/ /map:call /map:match !-- flowscripts -- map:match type=wildcard pattern=secure/*.flow map:call function={1}/ /map:match /map:act /map:match The authentication declaration looks like the following: authentication-manager global-variables handlermyapp/handler /global-variables handlers handler name=myapp redirect-to uri=cocoon:/login/ authentication uri=cocoon:raw:/auth/ /handler /handlers /authentication-manager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Removing a selectionList
I am using the on-value-changed event for a field to do some validation . If the value has a direct code match I leave the value if, however, there is more than one match I return a selectionlist and have the user choose from the list. This is all working well, however, when the user selects the correct value I no longer want the selectionlist. Is there a way to remove the selectionlist. Scenario: wd:on-value-change javascript // Use a component to find suppliers if (suppliersLength == 1) { event.source.value = element.getFirstChild().getAttribute(code); // And remove any selection list that may have been set previously } else if (suppliersLength 1) { supplier = new Array(supplierLength); // Fill array event.source.setSelectionList(supplier, value, label); } else { // Serve up an error } /javascript /wd:on-value-changed Thanks Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Querying A Repository of XML Files...Or, How To Do Portal Objects
(Sorry for the length of this post, but I think it highlights some classic issues that others may encounter so I thought it was worth being specific.) I'm building a web application -- not unlike a "portal" -- that contains mostly text content in files, and part of it requires me to solve a problem which is requiring me to bend my brain out of the SQL/Servlet paradigm and into the XML world, and I don't know the best approach. I picked Cocoon as my platform in part because of the elegance and simplicity of keeping content in xml files in a directory(s) where I can see them, and so I can have ad hoc document structures without having to be tied down to a RDBMS schema that can never match all the content types I'll be publishing. So I think for simplicity's sake here assume I have a directory with a thousand xml files of textual content, say, news articles. So now I'm running into the problem where I want to have objects on my site home page that are like portal objects/windows: theyeach contain clickable titles of a few pieces of content. Imagine a news portal home page where there's a "Sports News" block that lists the most recent three headlines and their dates; and a "Finance News" block that shows Finance headlines, etc., and maybe sometimes in addition to the headline the first sentence of the story is displayed, i.e. each portal block can have it's own behaviors that are configurable. So each of these objects on the page basically does the same function, but the object's parameters are slightly different based upon what category of news it grabs headlines for, how many headlines the editor or user wants displayed, etc. So any given portal object needs at some point to be able to query my repository for a few titles that meet a few criteria. That's easy in SQL of course -- but how do I do something like that in the XML/Cocoon world? Do I index? Do I scour through once and then cache for a few hours? Do I have a separate procedural/Java process that creates intermediate files that can be more rapidly transformed into headline lists? I can imagine different general approaches, but I don't know how to implement with the Cocoon toolset, and I'm sure I'm not the first person to have this requirement. Thanks, David
Re: [Sitemap] auth-protect action - bug or feature?
Try map:match type=wildcard pattern=secure/** map:act type=auth-protect map:parameter name=handler value={global:handler}/ !-- logout function -- map:match type=wildcard pattern=secure/logout map:call function=logout map:parameter name=handler value={global:handler}/ /map:call /map:match !-- flowscripts -- map:match type=wildcard pattern=secure/*.flow map:call function={1}/ /map:match /map:act map:redirect-to uri=login/ /map:match If the auth-protect action fails the map:redirect-to uri=login/ will be executed otherwise only what is contained within the action will be executed. Joe Markus Heussen wrote: Hi all! If I call my following protected pipeline the result is a 404 page not found error. I thought the right behavior is to redirect automatically to the login resource?? Is it a bug or am I doing something wrong? I am using Cocoon from the few days old CVS Head under SDK1.4.2 and TC 4.1.30. Thanks for helping, Markus map:match type=wildcard pattern=secure/** map:act type=auth-protect map:parameter name=handler value={global:handler}/ !-- logout function -- map:match type=wildcard pattern=secure/logout map:call function=logout map:parameter name=handler value={global:handler}/ /map:call /map:match !-- flowscripts -- map:match type=wildcard pattern=secure/*.flow map:call function={1}/ /map:match /map:act /map:match The authentication declaration looks like the following: authentication-manager global-variables handlermyapp/handler /global-variables handlers handler name=myapp redirect-to uri=cocoon:/login/ authentication uri=cocoon:raw:/auth/ /handler /handlers /authentication-manager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Cocoon from CD
Hi, Check the documentation of Tomcat. I know that jetty uses the property of the system 'java.io.tmpdir'. Tomcat 4 uses CATALINA_TEMP variable in it's startup script for this. Other versions of Tomcat (like 3 in particular) might work differently. You might want to search on the net on setting the work directory for Tomcat, this might also come in handy. Michael Faschinger wrote: Hi, Configure Cocoon+Tomcat to use a TEMP directory on the hard-drive and everything should work fine. that's right what I wanted to do, but where do I set these parameters? Thanks, regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ivo Limmen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Binding form to selected element of XML
Tony Edwards wrote: Hi people, I'm progressing nicely with my journey down the enlightened path of Woody/CForms, incorporating more of its wonderful features as I go. I'm now at the stage where I'd like to bind the content of a CForm to a selected element of a large XML document. Is there any way to programmatically or otherwise nominate the xpath attribute of the wb:context element in the binding file? For example, here's a snippet of the document I'm editing: hierarchy description=Tony Test Hrcy hrcyNumber=16 hNode ID=517 copyStatus=L nodeNum=517 seqNum=0Date Testing Nodes/hNode hNode ID=331 copyStatus=L nodeNum=331 seqNum=0Node1/hNode hNode ID=505 copyStatus=L nodeNum=505 seqNum=0Node Test/hNode hNode ID=526 copyStatus=L nodeNum=526 seqNum=0New Node for Mondays/hNode hNode ID=474 copyStatus=L nodeNum=474 seqNum=1Node Not For Role Ate/hNode hNode ID=684 copyStatus=L nodeNum=684 seqNum=2Frunobulax/hNode /hierarchy Let's say I want to bind on the 'Frunobulax' node. Can I specify the path as //[EMAIL PROTECTED]:selectedNode} (where selectedNode = 684) or similar? Nope, but there is a far easier way to cope with this: when you load the XML file to a DOM-tree, then you can easily have code that selects the DOM-element-context you want to work on you just give that to the binding in the load() and save() HTH, -marc= -- Marc Portierhttp://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center Read my weblog athttp://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing a selectionList
Joe, this is a clear feature-request (and a very sensible one) pls add it to bugzilla -marc= Joe Latty wrote: I am using the on-value-changed event for a field to do some validation . If the value has a direct code match I leave the value if, however, there is more than one match I return a selectionlist and have the user choose from the list. This is all working well, however, when the user selects the correct value I no longer want the selectionlist. Is there a way to remove the selectionlist. Scenario: wd:on-value-change javascript // Use a component to find suppliers if (suppliersLength == 1) { event.source.value = element.getFirstChild().getAttribute(code); // And remove any selection list that may have been set previously } else if (suppliersLength 1) { supplier = new Array(supplierLength); // Fill array event.source.setSelectionList(supplier, value, label); } else { // Serve up an error } /javascript /wd:on-value-changed Thanks Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Portierhttp://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center Read my weblog athttp://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]