Re: java.net.BindException: Address already in use (was: Apperant xsl:include/ Failure)
This used to happen under older versions with hsql. It didn't shut down properly with cocoon and you'd get a BindException when restarting. Didn't cause any problems really, and if you don't need hsql for production you should get rid of it anyway. From your xalan version I'd guess you may be using a version of cocoon that did not have this corrected. Geoff At 04:05 AM 5/28/2003, you wrote: Hello Chris, please compose a new mail if you want to open a new thread. Otherwise the subject is misleading and the mails are wrongly sorted in thread-view-able browsers. Server.run/init: java.net.BindException: Address already in use This may happen if your server was not shut down correctly the last time. This has not much to do with Cocoon I guess. You can kill such processes in Linux with killall -9 java. BUT beware this kills every java process on this machine owned by the logged in user. It's also possible to search for the process ids and kill them step by step. In Windows NT or 2000 you can use the task manager to kill java processes. Joerg Chris Pratt wrote: After much effort I have got cocoon half working on Weblogic 6.10 Sp3 Now I am getting the following error: Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors. In the web log I have the following: Server.run/init: java.net.BindException: Address already in use Any ideas. I do have the xalan-2.3.1.jar as first entry in the classpath. Chris - 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: session attributes in sitemap
From: Yury Mikhienko [mailto:[EMAIL PROTECTED] On Wed, 28 May 2003 11:56:55 +0200 Mato Mira, Fernando [EMAIL PROTECTED] wrote: Is there a way to set a session attribute in the sitemap? Try use SessionValidatorAction I don't think this can be used to set it to the value of a match variable like {1}. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session attributes in sitemap
On Wed, 28 May 2003 15:08:36 +0200 Mato Mira, Fernando [EMAIL PROTECTED] wrote: From: Yury Mikhienko [mailto:[EMAIL PROTECTED] On Wed, 28 May 2003 11:56:55 +0200 Mato Mira, Fernando [EMAIL PROTECTED] wrote: Is there a way to set a session attribute in the sitemap? Try use SessionValidatorAction I don't think this can be used to set it to the value of a match variable like {1}. I don't understand what you want -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SQLTransformer bug
Dear Cocooners, I've think I found a bug in the SQLTransformer in Cocoon 2.0.4, at least under Informix. I use a simple query (select * from table) and it fails. After having investigated a bit, I've come to the conclusion that it tries to do the following open connection create prepared statement get resultset close connection navigate through the gathered resultset Of course when navigating through the resultset, you get an SQLException. If I comment out the connection closing, everything works ok. The right order would need to be: open connection create prepared statement get resultset navigate through the gathered resultset close connection Has this happened to anyone else? David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why fo:wrapper tag does not work in fo:block
All, Maybe this is the wrong place to ask a question on XSL-FO. Can someone point me to a mailing list on XSL-FO? Thanks a lot! Charlene -Original Message- From: Yan, Charlene Sent: Tuesday, May 27, 2003 5:26 PM To: [EMAIL PROTECTED] Subject: Why fo:wrapper tag does not work in fo:block I am using XSL formatting objects. I'm trying to specify different font weight to some text in one block. fo:blockfo:wrapper font-weight=boldSolution Name: /fo:wrapperxsl:value-of select=name / /fo:block Somehow after I add the wrapper tag, the text inside the wrapper is not displayed. Only select name is displayed. I have attached the stylesheet below. Please help me! Thanks. Charlene = ?xml version=1.0? !-- CVS $Id: page2fo.xsl,v 1.2 2003/05/07 04:57:13 vgritsenko Exp $ -- xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=solution page-height=29.7cm page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm margin-right=2.5cm fo:region-before extent=3cm/ fo:region-body margin-top=3cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master fo:page-sequence-master master-name=solution fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-reference=page page-position=first/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-reference=solution fo:static-content flow-name=xsl-region-after fo:block fo:leader leader-pattern=rule leader-length=18cm / /fo:block fo:block text-align=center font-size=10pt font-family=serif line-height=14ptPage fo:page-number//fo:block /fo:static-content fo:flow flow-name=xsl-region-body xsl:apply-templates/ /fo:flow /fo:page-sequence /fo:root /xsl:template xsl:template match=solution fo:block fo:block font-size=14pt space-before.optimum=24pt text-align=LeftSolution Detail Report /fo:block fo:blockfo:wrapper font-weight=boldSolution Name: /fo:wrapperxsl:value-of select=name / /fo:block fo:block font-size=10pt space-before.optimum=24pt text-align=Leftfo:wrapper font-weight=boldSolution ID: /fo:wrapperxsl:value-of select=swbId //fo:block fo:block font-size=10pt space-before.optimum=24pt text-align=LeftSolution Keyword(s): xsl:value-of select=displayedKeywords //fo:block fo:block font-size=10pt space-before.optimum=24pt text-align=Leftfo:wrapper font-weight=bold/fo:wrapper /fo:block fo:block font-size=10pt space-before.optimum=24pt text-align=LeftSolution Description:/fo:block fo:block font-size=10pt space-before.optimum=24pt text-align=Leftxsl:value-of select=longDescription //fo:block fo:block font-size=10pt space-before.optimum=24pt text-align=Left/fo:block /fo:block /xsl:template /xsl:stylesheet - 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: session attributes in sitemap
Look at the Sunshine component: http://www.plenix.org/dbprism/doc/xdocs/developing/sunshine-contexts.html or create a simple action to do that. David -Mensaje original- De: Mato Mira, Fernando [mailto:[EMAIL PROTECTED] Enviado el: miƩrcoles, 28 de mayo de 2003 15:09 Para: '[EMAIL PROTECTED]' Asunto: RE: session attributes in sitemap From: Yury Mikhienko [mailto:[EMAIL PROTECTED] On Wed, 28 May 2003 11:56:55 +0200 Mato Mira, Fernando [EMAIL PROTECTED] wrote: Is there a way to set a session attribute in the sitemap? Try use SessionValidatorAction I don't think this can be used to set it to the value of a match variable like {1}. - 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: Why fo:wrapper tag does not work in fo:block
Yan, Charlene wrote: All, Maybe this is the wrong place to ask a question on XSL-FO. Can someone point me to a mailing list on XSL-FO? Thanks a lot! Charlene Hello Charlene, the Mulberry XSL-list is for both XSLT and XSL FO: http://www.mulberrytech.com/xsl/xsl-list/. If it is a specific problem with FOP, you can ask on the FOP user list: http://xml.apache.org/mail.html#fop-user. Joerg -- System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 [EMAIL PROTECTED] www.virbus.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error using Protected Area in samples
Using Version: 2.1m3-dev, RedHat 9.0, Tomcat 4.1.24. I tried to access Protected Area in samples and get the following error: org.apache.cocoon.ProcessingException: Unable to get transformer handler for stylesheets/simple-page2html.xsl: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating Transform Handler cause: org.apache.excalibur.xml.xslt.XSLTProcessorException: Unable to create templates for stylesheet: file:/var/tomcat4/webapps/cocoon/samples/protected/stylesheets/simple-page2html.xsl Anybody see this and figure it out? -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems tracking session from page to page
I'd have to look into the code to figure out exactly _why_ this happened, but my understanding is that the start of generating commits the response. Exactly what constitutes the start I don't know off hand, but my guess would be when the SAX method startDocument() is called on the pipeline. You get the same error I think if you omit the create-session attribute on a simple one-xsp pipeline that uses session code inside the root element. HTH, Geoff At 02:14 AM 5/28/2003, you wrote: geoff, you're right! i moved the create-session attribute to the first map:part in the aggregation you saw in my example. i did the same in another nearly identical aggregation in my sitemap. now i'm able to access the session from within the particular map:part where i wanted to in the first place. i don't quite understand why this change made it work, though. my only clues are: 1.) by accessing the session in the first map:part, i've somehow enabled session access in a later map:part that otherwise wouldn't have been able to access the session successfully. 2.) the IllegalStateException was telling me that i Cannot create a session after the response has been committed. each map:part invokes a matcher similar to this one: map:match pattern=choose_item.products map:generate type=serverpages src=xsp/choose_item.products.xsp/ map:serialize type=xml/ /map:match does the map:serialize commit the response? is that what the error message is talking about? thanks! Mike Lenyon - Original Message - From: Geoff Howard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 12:10 PM Subject: Re: problems tracking session from page to page I think the issue is the aggregation. to test, go directly to the general.currentproduct pipeline (with the create-session attr. in). If that works, try to move it to the first map:part if you can as a workaround. A better solution would be to look into the session actions that will ensure you have created your session before the pipeline starts generating. HTH, Geoff At 08:56 AM 5/27/2003, you wrote: hi geoff, yes, i've tried putting create-session in the xsp:page tag. but i still get the IllegalStateException. as you're probably aware, having create-session causes the following line to appear at the beginning of the generate() method: Session session = request.getSession(true); that's the line that the exception refers to. here's a snippet from my sitemap to exemplify one of the two pages where to problem occurs: map:match pattern=choose_item.html map:aggregate element=page map:part src=cocoon:/choose_item.products/ map:part src=cocoon:/general.productcategories/ map:part src=cocoon:/common/ map:part src=cocoon:/general.currentproduct/ !-- only page that accesses session -- /map:aggregate map:transform type=xslt src=style/choose_item.xsl/ map:transform type=i18n/ map:serialize type=html/ /map:match does that provide any useful clues? thanks in advance. Mike Lenyon - Original Message - From: Geoff Howard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 8:22 AM Subject: Re: problems tracking session from page to page But I think the problem is that your code is working with the session after processing starts and attempting there to create a session after it's too late. Have you tried the create-session attribute yet? Geoff Howard At 07:05 AM 5/27/2003, you wrote: antonio, thanks for your response, but please look at what i'm saying: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; causes the error message: java.lang.IllegalStateException: Cannot create a session after the response has been committed in other words, not having create-session=true doesn't matter. simply having xmlns:xsp-session=http://apache.org/xsp/session/2.0; causes the problem. Mike Lenyon - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 1:49 AM Subject: Re: problems tracking session from page to page Hi: I dont remember if changed from default. Before the default was create a new session. Now I think this is not the default. Please try to use: xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: No way to extend XSP/JSP classpath?
The next version (2.2) of cocoon will enable hot-deployable applications, but for now you are stuck editing configuration files for some needs. You can automate this process with ant using cocoon's XConfToolTask which despite it's name can be used to patch other xml config files (except 2.0.x can't do web.xml). Don't you edit the config files for your servlet container and http server? What's so bad about editing a sitemap and xconf? Geoff At 03:12 AM 5/28/2003, you wrote: From: Geoff Howard [mailto:[EMAIL PROTECTED] Look in cocoon.xconf and web.xml for additional classpath. I'm not sure if this is available within xsp though. Great. I don't know if this will work for XSP but I don't care: It's bad enough I have to modify the main sitemap and add my stuff as a subdirectory of cocoon. I still haven't had to touch cocoon.xconf so I'll leave it alone for now. Thanks - 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]
XSP : pages auto-refreshes a hunderd time!
I had this problem a while ago, and it comes back. But I don't know why! My page reloads itself until an error comes. If I take a tracer I can see that the page comes correctly, but once loaded it is reloaded again and again! Why? Has anybody any idea? Here is the complete XSP-page : xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:session=http://apache.org/xsp/session/2.0; xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xsp:structure xsp:includejava.text.SimpleDateFormat/xsp:include /xsp:structure page tb_titreWorkflow Manager - session from session:get-attribute name=user//tb_titre content topbanner xsp:logic Date now = new Date(); SimpleDateFormat formatter = new SimpleDateFormat(dd--yy HH:mm:ss); String dateform = formatter.format(now); /xsp:logic tb_usersession:get-attribute name=user//tb_user tb_usertypesession:get-attribute name=role//tb_usertypetb_addressxsp-request:get-uri/.print?xsp -request:get-query-string//tb_address tb_datexsp:exprdateform/xsp:expr/tb_date /topbanner form action=add-order_add method=post table tr td align=rightOrder Name : /td td align=leftinput type=text name=myname//td tdinput type=submit value=Add order//td /tr /table /form menuAlist of all orders:/menuA esql:connection esql:poolwfmgt/esql:pool esql:execute-query esql:query SELECT * FROM Orders WHERE od_archive = 0 AND od_sector = session:get-attribute name=sector/ /esql:query esql:results table border=1 cellspacing=2 linkthOrder ID/linkth thOrder Name/th linkthEdit Order/linkth linkthDelete Order/linkth thCreation Date/th esql:row-results tr linktdaxsp:attribute name=hrefview-order?myID=esql:get-string column=od_ID//xsp:attribute esql:get-string column=od_ID//a/linktd tdesql:get-string column=od_name//td linktdaxsp:attribute name=hrefupd-order?myID=esql:get-string column=od_ID//xsp:attribute Edit /a/linktd linktdaxsp:attribute name=hrefdel-order_del?myID=esql:get-string column=od_ID//xsp:attribute Delete/a/linktd tdesql:get-string column=od_date//td /tr /esql:row-results /table /esql:results /esql:execute-query /esql:connection h4 align=rightaxsp:attribute name=hreforder-archivate_arc/xsp:attributeView archived orders/a/h4 br/ centerh4axsp:attribute name=hrefmanage-order/xsp:attributeBack/a/h4/center /content /page /xsp:page - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re[2]: FOP/HSSFSerializer's and non-english characters
YM Ok, the PDF serializer works properly (but with .ttf fonts only), but what about the HSSFSerializer? YM I still does not properly generate the exel document with russian characters :(( There is the jakarta-poi-1.7.0-dev-20020624.jar library in the cocoon-2.1/src/blocks/poi/lib. It does not support russian characters. The support begins from version 1.8-dev. See http://jakarta.apache.org/poi/changes.html#1.8-dev; The current version of POI is 2.0-pre1. I build and install (with cocoon2.0.4 rebuild) the jakarta-poi-1.8.0 but get the some result: I get the B5AB symbols instead the word :(( May be I must configure the HSSFSerializer (like in FOP cause)? in sitemap.xmap I have the following configuration: map:serializers default=html ... map:serializer name=xls src=org.apache.cocoon.serialization.HSSFSerializer mime-type=application/vnd.ms-excel encodingKOI8-R/encoding /map:serializer ... /map:serializers may be that configuration is not complete? Where I'm wrong? Thanks for advise. -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apperant xsl:include/ Failure
That seems to be the case; when using Xalan, the error is not generated. (Sorry for not keeping the thread, I hadn't subscribed to the list yet.) Joerg Heinike wrote: Dave Allen Barker Jr wrote: Stylesheets that use xsl:inclue/ generate a Unable to get transformer handler error. Any help would be greatly appreciated! I hope the following information is insightful. Hello Dave, not so long ago there was a problem with path resolving in XSLTC. AFAIK it's fixed, I only don't know if it was before or after the 2.1M2 release. Maybe Bruno can help here. The problem was with the path resolving in XSLTC, you can switch to Xalan and it should work. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17825 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19324 Joerg My Process 1. Exploring the LinkRewriter Demos, I went to the sitedemo. 2. org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.apache.avalon.framework.CascadingRuntimeException: Error accessing attribute '/site/index/@href' from input module 'linkmap'. Error using source cocoon:/linkmap 3. So, I tried to bring up the linkmap, and got: org.apache.cocoon.ProcessingException: Unable to get transformer handler for stylesheets/relativize-linkmap.xsl: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating Transform Handler Things I've Tried * relativize-linkmap.xsl imports dotdots.xsl. If I replace the xsl:include/ with the content of the dotdots.xsl stylesheet, the problem dissapears. * If I visit other samples that use xsl:include/, the problem follows. * Trying Cocoon 2.1-M1, this problem does not exist. My Environment Cocoon Version: 2.1m2 Servlet Container: Jetty (included with Cocoon) Java Version: 1.4.1_02 OS: Windows XP I didn't see anyone report the problem, and since it's so fundamental, I figure it's me. So, thank you in advance for any pointers you can give! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apperant xsl:include/ Failure
Bruno Dumon wrote: On Wed, 2003-05-28 at 10:11, Joerg Heinicke wrote: Dave Allen Barker Jr wrote: Stylesheets that use xsl:inclue/ generate a Unable to get transformer handler error. Any help would be greatly appreciated! I hope the following information is insightful. Hello Dave, not so long ago there was a problem with path resolving in XSLTC. AFAIK it's fixed, I only don't know if it was before or after the 2.1M2 release. Maybe Bruno can help here. We did not upgrade xalan after the M2 release, so it seems there might be yet another problem. Dave, I assume you have nothing in your JAVA_HOME/jre/lib/endorsed directory? That is correct. If so, could you create a simple reproducable testcase (and by preference, file it as a bug in bugzilla)? Done, http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20308. Thanks. Thank you! (Sorry for not keeping the thread, I hadn't subscribed to the list yet.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error using Protected Area in samples
Hello Bobby, try to use Xalan instead of XSLTC for this transformation. In the best case it will work (possible bug in XSLTC: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20308), in the worst case you will at least get a better error message. Joerg Bobby Mitchell wrote: Using Version: 2.1m3-dev, RedHat 9.0, Tomcat 4.1.24. I tried to access Protected Area in samples and get the following error: org.apache.cocoon.ProcessingException: Unable to get transformer handler for stylesheets/simple-page2html.xsl: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating Transform Handler cause: org.apache.excalibur.xml.xslt.XSLTProcessorException: Unable to create templates for stylesheet: file:/var/tomcat4/webapps/cocoon/samples/protected/stylesheets/simple-page2html.xsl Anybody see this and figure it out? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using XML String in XSP
I've tried your suggestions for whitespace and alternative xml tags (and attributes) and it still craps out. The example from Cocoon Developers book (shown below) doesn't even work xsp:logic String xmlString = testA test value/test; util:include-exprutil:exprxmlString/util:expr/util:include-expr /xsp:logic Even putting the xsp:expr/ tag around xmlString doesn't work either. I've tried addeding/removing whitespace all over the place and still not working. The generated .java code for the .xsp file is just putting the following in the code: String xmlString = which is where I see the errors in the log files. Seems like a definite bug. I'm to the point where I'd rather just write my own Transformer. Seems like a bug like this has to be a show stopper for a lot of people. -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 3:23 AM To: [EMAIL PROTECTED] Subject: Re: using XML String in XSP On 27.May.2003 -- 04:47 PM, Gould, Troy (ELS) wrote: I'm using cocoon 2.0.4 and having difficulties with the xsp-util:include-expr and xsp:expr tags. I have a method in a class that returns a XML Document as a String which I want to utilize within an xsp page. However, I don't want the string to come back as text because the '' tag (and others) will be escaped as lt;. I want the returned xml string to become part of the SAX stream. Then, I went to using: xsp:logic String testDoc = WebServiceClient.getDocument(testDoc.xml); content util:include-exprutil:exprxsp:exprtestDocxsp:expr/util:expr/util: include-expr /content (mind the whitespace!) or content util:include-expr expr=testDoc/ /content /xsp:logic All this was doing was printing out XML with util:include-expr and util:expr as tags. The tag processor seems to not be processing my util namespace tags. So, do you use the correct namespace for them? Does your XSP have a correct structure (e.g. some top level tag starting the page?) The real problem is can I use XSP to get a XML Document as a String and still have it put into the SAX stream as a Node or do I need to just write my own custom generator to do this instead? This is possible from XSP. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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: How to access sourceResolver in action configure() method
The only thing I can think of is to upgrade to cocoon 2.1 where a SourceResolver is available from the ComponentManager. But then you already knew that . . . DURDINA Michal wrote: Charles, thank you for a tip, but this way I only get the root of the webapplication. (This produces the same result as something I was using: org.apache.cocoon.environment.SourceResolver env = org.apache.cocoon.components.CocoonComponentManager.getCurrentEnvironment(); path = env.resolve(myConfigFileName).getSystemId(); File file = new File(path); ) But I have my action in mounted sitemap and sourceResolver for mounted sitemap works in the context of the sitemap directory. If my mounted sitemap is located in 'subsitemap' directory and I use action within this sitemap, correct resolving of 'myconfig.xml' would be d:/jboss/server/default/deploy/webapp.war/subsitemap/myconfig.xml but via Context or Environment I only get my file resolved as d:/jboss/server/default/deploy/webapp.war/myconfig.xml - what is wrong. Do not you know any way how to get same environment object as that which is passed by SitemapManager to the act() method of any action located in mounted sitemap? Maybe I could get it from ComponentManager by some role? Thank you, Michal -Original Message- From: Charles Yates [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 7:32 PM To: [EMAIL PROTECTED] Subject: Re: How to access sourceResolver in action configure() method Can you put the configuration stuff into cocoon.xconf? Then it would be available in configure(). If not you could implement Contextualizable and get the HttpContext like this: public void contextualize(Context aContext) throws ContextException { myContext = (HttpContext) aContext.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT); } then you could get the file like this: myConfigFile = new File(myContext.getRealPath(myConfigFileName)); Charles (this works in 2.1, should in 2.0.4, though maybe minor differences) DURDINA Michal wrote: Hello! I am using own ConfigurableComposerAction and I have problem with loading configuration from external file (from filesystem). In act() method, I would use SourceResolver parameter passed to this method, but in configure() method I do not know where should I get the source resolver from. I am using Cocoon 2.0.4 with compiled sitemap, thus I cannot use this: public void compose(ComponentManager manager) throws ComponentException { this.manager = manager; this.resolver = (SourceResolver)manager.lookup(SourceResolver.ROLE); } Thank you for your help, Michal - 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] __ Informacia od NOD32 1.415 (20030521) __ Tato sprava bola preverena systemom NOD32 pre Exchange. http://www.eset.sk - 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: Can we stop cocoon logging this as errors?
there's a bug report on this: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16218 Tsui, Alban wrote: I have a webapp/site setup using cocoon 2.0.3 but whenever there is a redirection e.g. via action or users clicking hte pages very fast... I get the following: ERROR (2003-05-16) 13:53.20:296 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Cocoon servlet threw an Exception while trying to close stream. java.io.IOException: The stream has been closed Could this be suppressed anywhere? I don't want to switch off my logging totally alban This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using XML String in XSP
Gould, Troy (ELS) wrote: I've tried your suggestions for whitespace and alternative xml tags (and attributes) and it still craps out. The example from Cocoon Developers book (shown below) doesn't even work xsp:logic String xmlString = testA test value/test; util:include-exprutil:exprxmlString/util:expr/util:include-expr /xsp:logic Now, this example will not work as you have xml in your string literal which will result in broken java code. Use either CDATA or entities lt; gt; Even putting the xsp:expr/ tag around xmlString doesn't work either. I've tried addeding/removing whitespace all over the place and still not working. The generated .java code for the .xsp file is just putting the following in the code: String xmlString = See ;-) which is where I see the errors in the log files. Seems like a definite bug. Nope. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Link Hosting:
Hi Cocoon People, Just wanted to correct a few details concerning Cocoon Support at MediaHost(TM). First: What a surprise, but the URL changed and is now at http://www.mediahost.org and NOT at http://dev.startcom.organymore. Second: We offer today version 1.8.2 and the newest version 2.1. The customer can choose between this two versions, since we found out, that the older versionis still wanted. Everything on a Resin Enterprise - Apache server. Third: Thanks a lot for the great tool and thanks also for the listing of our URL for almost two years now!!! Signer: Eddy NiggCompany: StartCom Group at http://www.startcom.org MediaHost (TM) at http://www.mediahost.org ---StartCom Ltd.http://www.startcom.org Outgoing mail is certified Virus Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.484 / Virus Database: 282 - Release Date: 5/27/2003
Build Error in Cocoon
I have installed Cocoon, previously, but I was trying to build it from scratch and I ran into the error: BUILD FAILED file:C:/cocoon-2.1m2/build/cocoon2.1m2/temp/blocks-build.xml:1053: C:\cocoon-2.1m2\src\blocks\session-fw\lib not found. Relevant information: OS: Windows XP Pro JDK: 1.4.2 (Bleeding edge... Although I dont think that has anything to do with it...) Cocoon: 2.1 milestone 2 (If you couldnt tell from the error...) Any information is greatly appreciated. Scott McClure - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie Question: Where do I add actions to sitemap?
Cocooners, I have created an action, but I need to modify my sitemap.xmap like so: map:actions map:action name=myName src=com.mycompany.myclass / /map:actions Where do I put this? I've tried putting it before the components, after the components, etc. I've looked at a bunch of examples, but they don't show the entire file (only snippets). Thanks, Ross - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie Question: Where do I add actions to sitemap?
Actions go *inside* components (actions are a type of component, like generator, serializer, transformer, etc.): map:sitemap ... map:components map:actions.../map:actions map:generators/map:transformers/ etc. etc. HTH /S Ross Bleakney [EMAIL PROTECTED] wrote: Cocooners, I have created an action, but I need to modify my sitemap.xmap like so: map:actions map:action name=myName src=com.mycompany.myclass / /map:actions Where do I put this? I've tried putting it before the components, after the components, etc. I've looked at a bunch of examples, but they don't show the entire file (only snippets). Thanks, Ross - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Steven Cummings Columbia, MO Email: [EMAIL PROTECTED] AIM: cummingscs ICQ: 3330114 MSN: [EMAIL PROTECTED] __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie Question: Where do I add actions to sitemap?
Nevermind, I found the answer: put the actions element inside components/components Thanks, Ross On Wed, 2003-05-28 at 17:35, Ross Bleakney wrote: Cocooners, I have created an action, but I need to modify my sitemap.xmap like so: map:actions map:action name=myName src=com.mycompany.myclass / /map:actions Where do I put this? I've tried putting it before the components, after the components, etc. I've looked at a bunch of examples, but they don't show the entire file (only snippets). Thanks, Ross - 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]
log level? thought i set it correctly...
Hi, I am running cocoon 2.1-dev in tomcat 4. My log directory, $TOMCAT_HOME/logs is gets really big, so I figured I'd set the log levels from DEBUG to ERROR. So, I modified $MY_WEBAPP/WEB-INF/logkit.xconf and changed all the DEBUG to ERROR. I modified $MY_WEBAPP/WEB-INF/web.xml and changed the log level in there to ERROR. I looked in $TOMCAT_HOME/conf/web.xml and saw that there was only one spot to change the log level, in the JSP execution servlet. It was set as WARNING so I left that as is. I then stopped tomcat, cleared teh work directories and restarted. When I tail the logs, I still see tons of DEBUG messages, and my logs grow just as fast as before. What did I miss? Thanks __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log level? thought i set it correctly...
Tomcat logging is controled by $TOMCAT_HOME/conf/server.xml. See http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html icewind wrote: Hi, I am running cocoon 2.1-dev in tomcat 4. My log directory, $TOMCAT_HOME/logs is gets really big, so I figured I'd set the log levels from DEBUG to ERROR. So, I modified $MY_WEBAPP/WEB-INF/logkit.xconf and changed all the DEBUG to ERROR. I modified $MY_WEBAPP/WEB-INF/web.xml and changed the log level in there to ERROR. I looked in $TOMCAT_HOME/conf/web.xml and saw that there was only one spot to change the log level, in the JSP execution servlet. It was set as WARNING so I left that as is. I then stopped tomcat, cleared teh work directories and restarted. When I tail the logs, I still see tons of DEBUG messages, and my logs grow just as fast as before. What did I miss? Thanks __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - 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: FOP/HSSFSerializer's and non-english characters
Yury Mikhienko wrote: Ok, the PDF serializer works properly (but with .ttf fonts only), PFM fonts should work too, as well many OpenType fonts (OpenType extends TrueType). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP/HSSFSerializer's and non-english characters
Yury Mikhienko wrote: map:serializer name=xls src=org.apache.cocoon.serialization.HSSFSerializer mime-type=application/vnd.ms-excel encodingKOI8-R/encoding /map:serializer XLS is a binary format which *may* use Unicode. I don't think encoding is of any use here, and asking for KOI8 encoding is definitely pointless. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JXForm (XMLForm), Hibernate, Flowscript and the prefs example
I posted an implementation of the prefs example: (http://localhost:8080/cocoon/samples/flow/prefs/) to a Wiki page: http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormJXFormHibernateAndFlowscript. This examples uses JXForm and Hibernate for making the prefs persistent. The Hibernate Sessionfactory is implemented in an Avalon component and created from flowscript by the Cocoon componentmanager. Hugo Burm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pipeline using util:time/ ?
Hi, I want a URL like this: http://mysite.org/cocoon/myapp/today to be redirected or transformed to a URL: http://mysite.org/cocoon/myapp/2003/05/29 I know about util:time format=/MM/dd/ but not how I can integrate it in a pipeline. How can this be done? Thank you, Jakob Fix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xsl:import and dynamically generated xslt
Hi all, I've got this problem: I have a pipeline that correctly generates a xslt stylesheet. map:match pattern=prova map:generate src=tests/page2xml.xsl/ map:transform src=tests/addimport.xsl/ map:serialize type=xml/ /map:match This correctly generates this stylesheet: ?xml version=1.0 encoding=UTF-8 ? - # xsl:stylesheet xmlns:xsl=*http://www.w3.org/1999/XSL/Transform*; xsl:import href=*page2xml.xsl* / /xsl:stylesheet What's the problem? in another pipeline I use this stylesheet, but if my transformer is map:transform src=test.xsl/ where test.xsl is the generated stylesheet all works perfectly, if my trasformer is map:transform src=cocoon:/prova/ my xsl:import does not work, and on the server console I get an error: java.net.MalformerURLExeption: unknown protocol: cocoon at hava.net.URL.init ... ... at org.apache.xalan.xsltc.compiler.Import.parseContents So... why? anyone have experienced the same problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xsl:import and dynamically generated xslt
Pardom... My Environment Cocoon Version: 2.1m1 Servlet Container: Jetty (included with Cocoon) Java Version: 1.4.1_02 OS: Linux - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re[2]: [SOLUTION] FOP/HSSFSerializer's and non-englishcharacters
On Wed, 28 May 2003 20:20:19 +0400 Yury Mikhienko [EMAIL PROTECTED] wrote: YM Ok, the PDF serializer works properly (but with .ttf fonts only), but what about the HSSFSerializer? YM I still does not properly generate the exel document with russian characters :(( There is the jakarta-poi-1.7.0-dev-20020624.jar library in the cocoon-2.1/src/blocks/poi/lib. It does not support russian characters. The support begins from version 1.8-dev. See http://jakarta.apache.org/poi/changes.html#1.8-dev; The current version of POI is 2.0-pre1. For using the jakarta-poi-1.8.0-dev library in cocoon2.0.4 and Russian support implementation, I have implemented the several changes in jakarta-poi-1.8.0-dev and in cocoon's hssf element processor classes: (POI -1.8.0-dev ) In jakarta-poi-1.8.0/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java change the following [122]private Vector formats = new Vector(); [123]private Workbook workbook; [124]private boolean movedBuiltins = false; to [122]private static Vector formats = new Vector(); [123]private static Workbook workbook; [124] private static boolean movedBuiltins = false; and following [251] public short getFormat(String format) to [251] public static short getFormat(String format) (cocoon2.0.4) In cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Row.java change the following [137] retval.setStyle(_sheet.getCellStyleForRegion(_row.getRowNum(), (short)column)); to [137] retval.setStyle(_sheet.getCellStyleForRegion((short)_row.getRowNum(), (short)column)); and in cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Sheet.java change the [341] return new Row(_sheet.createRow(rowNo), this); to [341] return new Row(_sheet.createRow((int) rowNo), this); and in cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Cell.java add the [120] _cell.setEncoding(HSSFCell.ENCODING_UTF_16); -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]