Re: i18n again!!!!
you can for example: in xml : ?xml version=1.0 encoding=UTF-8? imageheader xmlns:i18n=http://apache.org/cocoon/i18n/2.0; topmenu name=HEADER_CHLOCALE_G i18n:attr=name target=groups.html?locale=de_CH height=7 width=10/ topmenu name=HEADER_CHLOCALE_F i18n:attr=name target=groups.html?locale=fr_CH height=7 width=11/ topmenu name=HEADER_CHLOCALE_E i18n:attr=name target=groups.html?locale=en_CH height=7 width=11/ /imageheader and in message catalog file : message key=HEADER_CHLOCALE_Gimages/de.gif/message On Tue, 2003-01-14 at 04:57, Hong Gia Dinh wrote: Hi all, I know that we can change language from text, button, attribute now if i want to change image according to languages!!! because some of my images having the text on it!! how can i do that?? with cocoon 2.0.3 ?? because i cant use i18n:when in cocoon 2.0.3 how can i change image as well as i change the text Thanks a lot GD - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cocoon user-roles=failure
Hi, try cocoon version=2.0 user-roles=/WEB-INF/jtk-component.roles at my site work with / Kim Phil Shafer wrote: I'm trying to use the user-roles attribute on the element of cocoon.xconf, but not having any luck. I've followed the FAQ (faq-configure-c2.html) and have: but I get: Exception reloading org.apache.avalon.framework.configuration.ConfigurationException: Error trying to load user-roles configuration at org.apache.cocoon.Cocoon.configure(Cocoon.java:400) (The full exception is appended) jdb'ing it, I see a mangled 'url' getting built: Step completed: thread=main, org.apache.cocoon.Cocoon.configure(), line=392, bci=490 392if (url == null) { main[1] l 388 SAXConfigurationHandler b = new SAXConfigurationHandler(); 389 org.apache.cocoon.environment.Context context = 390 (org.apache.cocoon.environment.Context) this.context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT); 391 URL url = context.getResource(userRoles); 392 = if (url == null) { 393 throw new ConfigurationException(User-roles configuration '+userRoles+' cannot be found.); 394 } 395 InputSource is = new InputSource(new BufferedInputStream(url.openStream())); 396 is.setSystemId(this.configurationFile.getSystemId()); 397 p.parse(is, b); main[1] p userRoles userRoles = WEB-INF/jtk-component.roles main[1] x url url = instance of java.net.URL(id=1076) { serialVersionUID: -7627629688361524110 protocolPathProp: java.protocol.handler.pkgs protocol: jndi host: null port: 0 file: /localhost/jtkWEB-INF/jtk-component.roles query: null authority: null path: /localhost/jtkWEB-INF/jtk-component.roles userInfo: null ref: null hostAddress: null handler: instance of org.apache.naming.resources.DirContextURLStreamHandler(id=1080) hashCode: -1 specifyHandlerPerm: null factory: instance of org.apache.naming.resources.DirContextURLStreamHandlerFactory(id=1081) handlers: instance of java.util.Hashtable(id=1082) streamHandlerLock: instance of java.lang.Object(id=1083) } Any thoughts on why the url ends up as /localhost/jtkWEB-INF/jtk-component.roles? Changing user-roles to cocoon:WEB-INF/jtk-component.roles makes context.getResources() return null, leading to another exception. Is there something I'm missing? I'm running a Cocoon 2.1 tree from late September and tomcat 4.1.12. Thanks, Phil ERROR 2002-11-05 14:29:03.160 [access ] (): Exception reloading org.apache.avalon.framework.configuration.ConfigurationException: Error trying to load user-roles configuration at org.apache.cocoon.Cocoon.configure(Cocoon.java:400) at org.apache.cocoon.Cocoon.initialize(Cocoon.java:284) at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1264) at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:465) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3341) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3534) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:510) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at
Re: Passing parameters to action-set
Ryan Agler wrote: Try {../process} instead of {process} or better if you use 2.1 try with the input-modules (check in the cocoon.xconf which one is set): {request:process} {attribute:process} -Original Message- From: Robin Wyles [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 3:04 AM To: [EMAIL PROTECTED] Subject: Passing parameters to action-set Hi All, Apologies if this has been answered before, I can't find it in the archives... I am trying to pass a parameter to an action set, but I cannot seem to get this to work. Should this be possible at all? Here are some snippets from my sitemap: [...] map:action-set name=nodePage map:act type=navigation map:parameter name=action value=set / map:parameter name=nextPage value={process} / map:parameter name=onError value={process} / /map:act /map:action-set [...] map:match pattern=home** map:act type=security map:parameter name=action value=isLoggedOn / map:act set=nodePage map:parameter name=process value=home / /map:act map:generate type=file src=docs/home.xml / map:call resource=XHTML / /map:act /map:match [...] Thanks in advance, Robin Wyles - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: local site setup
Hi, try the target clean-webapp on build, you will get a clean cocoon without samples. The other possibility is that you work in webapps/cocoon directory. You can try to work in a subdirectory that you mount in the main sitemap so that you don't lose all samples and docs (that are very valuable for the start). for example: webapps/cocoon/mytests and mount it in the main sitemap.xmap with: !-- pipeline mounting the test dir -- map:pipeline map:match pattern=mytests/** map:mount check-reload=yes src=mytests/ uri-prefix=mytests/ /map:match /map:pipeline have fun with cocoon ! Kim Peter Koellner wrote: hi! i'm sure this must be some dumb beginner's question, since nobody seems to have asked it until now. ok. now i have got this bright new xml-cocoon2 from cvs, built it, copied the war file to tomcat3.3's webapps directory, got the whole site running. so far, so good. what i don't quite understand at the moment is how am i supposed to remove the whole demo site and add my own content without intermingling with the cocoon cvs tree? i mean, do i have to work inside the cocoon directory, which obviously was generated from the war file? or even inside the cocoon source repository? can't be, or can it? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: i18n language choice
Try something like (with .. = # levels where you are in the sitemap) to access locale in the session : map:transform type=i18n map:parameter name=locale value={../../locale}/ /map:transform Kim Lorenzo De Sio wrote: Hmmm...I'm working with 2.0.3. Actually, I've noticed this behavior: in my example, i18n transformation is not embedded into any LocaleAction; - if I don't pass anything, neither in sitemap, request or session, the client locale is used (I can tell since server is English, clients are Italian :-)); - if I pass a sitemap parameter directly, as in previous example (map:parameter name=locale value=en/), it simply gets ignored, and client locale (Italian) is still used; - if I pass a request parameter ( URI?locale=en ), it correctly switches to English; - if I set somewhere a session parameter (xsp-session:set-attribute name=localeen/xsp-session:set-attribute), it correctly switches to English; Sure I'm doing something wrong. Anyway, this is fine for me, since I'm going to store preferences in a session attribute. Thanks again, L. -Messaggio originale- Da: Piroumian Konstantin [mailto:[EMAIL PROTECTED]] Inviato: mercoledì 2 ottobre 2002 14.49 A: '[EMAIL PROTECTED]' Oggetto: RE: i18n language choice Passing the locale name using a sitemap parameter was added since version 2.0.2 or even 2.0.3. In the older versions the i18n transformer uses LocaleAction's method internally to obtain the locale. Check the sitemap in latest i18n samples (/cocoon/samples/i18n/) - they use LocaleAction to get the locale and then pass it to the i18n transformer. And it works. This functionality is implemented in 2.1 versions as well. Regards, Konstantin -Original Message- From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 4:17 PM To: Cocoon Users (E-mail) Subject: i18n language choice Hi, I'm starting some work with the i18n transformer, and I'm facing a problem. I want to choose the i18n language with a sitemap parameter, but passing the locale parameter seems to not work. BTW, Everything works if I choose the language with a query string locale param. Here are a few sitemap fragments: [...] map:transformer logger=sitemap.transformer.i18n name=i18n src=org.apache.cocoon.transformation.I18nTransformer catalogue-namemessages/catalogue-name catalogue-locationi18n/catalogue-location /map:transformer [...] map:transform type=i18n map:parameter name=locale value=en/ /map:transform Thanks in advance, L. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ... and another No suitable driver error
Hi, try in cocoon.xconf with driver jdbc name=oracle-pool pool-controller min=5 max=10 oradb=true/ auto-committrue/auto-commit dburljdbc:oracle:thin:@prdwh1:1521:ITFP1A/dburl user./user password./password driveroracle.jdbc.driver.OracleDriver/driver /jdbc or at least in web.xml init-param param-nameload-class/param-name param-value oracle.jdbc.driver.OracleDriver /param-value /init-param you need to load the driver at start. Kim Hay Bruce wrote: Hi everyone, While trying to access an Oracle 8.1.7 database via an XSP page using ESQL I get the following error: java.lang.RuntimeException: Error opening connection to dburl: : No suitable driver The connection pool is defined in cocoon.xconf as: jdbc name=oracle-pool pool-controller min=5 max=10 oradb=true/ auto-committrue/auto-commit dburljdbc:oracle:thin:@prdwh1:1521:ITFP1A/dburl user./user password./password /jdbc and the XSP code accessing the database (attempting, I should say) is simply: esql:connection esql:execute-query esql:pooloracle-pool/esql:pool esql:query select user from dual /esql:query esql:results esql:row-results esql:get-columns/ /esql:row-results /esql:results esql:no-results/ esql:error-results/ /esql:execute-query /esql:connection There is no problem in loading the JDBC driver since I don't get a java.lang.ClassNotFoundException at this point -- Unknown-thread/CocoonServlet: Trying to load class: oracle.jdbc.driver.OracleDriver A small java application which connects using the method: Connection conn = DriverManager.getConnection (jdbc:oracle:thin:@prdwh1:1521:ITFP1A, , ); does work. I'm using Tomcat 4.0.4, Cocoon 2.0.3 (cocoon-2.0.3-vm14-bin.tar.gz) and JDK 1.4 with the Oracle classes from classes12.zip (renamed as .jar and installed in $COCOON_HOME/WEB-INF/lib). Any ideas? Bruce - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hsqldb server/client startup sequence
Hello, I m trying to use hsqldb from a cocoon application. Now I have the problem that when I run cocoon on a unix system hsqlserver start after that cocoon try to open the connection pool, resulting in no connection to DB. There is a possibility to force cocoon by startup to start first the hsqldb server and then try to open the DB connection pool ? Thanks Kim - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hsqldb server/client startup sequence
What's your Cocoon version? Everything works fine here with 2.0.3. Cocoon 2.0.3, tomcat 4.0.1, SunOS mysystem 5.8 Generic_108528-01 sun4u sparc SUNW,Ultra-4 Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24) Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode) Kim Vadim Thanks Kim - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can't start cocoon under root
type $xhost+ on a terminal of the user witch started the X server. Kim PS: why you want to start tomcat under roor user ... this is normally a bad idea. Quoting Thomas Garger [EMAIL PROTECTED]: hi! i use tomcat 4.0.1, cocoon 2.0.2 and SUSE linux 8.0 if i start tomcat under a normal user (not root) everthing works fine. but if i start tomcat under root user - and i want to access cocoon -there is an error message in my catalin.out like this: Xlib: connection to 212.186.159.80:0.0 refused by server Xlib: No protocol specified -the cocoon page puts out the following org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. . . . -my startup.sh looks as following : export DISPLAY=212.186.159.80:0 BASEDIR=`dirname $0` $BASEDIR/catalina.sh start $@ if i don't put in the line export DISPLAY=212.186.159.80:0, than under a normal user it's also not working why this works with a non root user and not with root? greetings, tom - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]