cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Cocoon still messing with i18n in session
Date Tue, 18 Jul 2006 07:26:57 GMT
I thought you did have it working? You did send a mail about a week ago that it worked: did
it work, or didn't you test it right?

I also explained that using <use-locale>false</use-locale>, will force the LocaleAction
to discard the locale in the request. This is not what you want. 

Did you sort out why you have 

>      <create-session>true</create-session>
>      <store-in-session>true</store-in-session>

set to true? Anyway, I got it working having jvm shot down, clear the cache, use-locale set
to true, and restart.

If you keep having problems, try to embed the LocaleAction.java in your project and see with
debug and system.out statements where it goes wrong,

Ard

> 
> 
> I thought I had it all sorted out. No... I tried using cocoon fro SVN
> 2.1.X. The problem seems to occur when I use a caching 
> ipieoline and when
> I am using a noncaching pipeline everything seems to work. 
> But I really
> need the caching system of Apache Cocoon. We are using massing XSL
> transformations to display our pages and wihtout it working 
> my project is
> worth nothing. 
>    If you can, please help!!! I've been searching for a solution for a
> long time and I can seem to get away with that showstopper.
> 
> Here is a link with the localeaction for those who are not 
> familiar with it : 
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/acting/
> LocaleAction.html
> 
> I am using ti because it seems it is the way in Apache Cocoon 2.1.X. 
> 
> Here is an exceprt of the root sitemap.xmap
> 
> ...
> <map:transformer name="i18n"
> src="org.apache.cocoon.transformation.I18nTransformer">
>      <catalogues default="default">
>        <catalogue id="default" name="messages"
> location="translations/default"/>
>      </catalogues>
>      <untranslated-text>untranslated</untranslated-text>
>      <cache-at-startup>true</cache-at-startup>
>  </map:transformer>
> ...
> <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction">
>      <locale-attribute>locale</locale-attribute>
>      <use-locale>false</use-locale>
>      <default-locale language="fr" country="CA"/>
>      <create-session>true</create-session>
>      <store-in-session>true</store-in-session>
>      <store-in-cookie>false</store-in-cookie>
>      <store-in-cookie>false</store-in-cookie>
>    </map:action>
> </map:actions>
> ...
> 
> <map:pipeline type="caching">
> 
> <map:act type = "locale">
>     <!-- welcome page -->
>     <map:match pattern="">
>       <map:generate src="welcome.xml"/>
>       <map:transform src="welcome.xslt">
>         <map:parameter name="contextPath" 
> value="{request:contextPath}"/>
>       </map:transform>
> 	<map:transform type = "i18n">
> 		<map:parameter name = "locale" value = 
> "{session-attr:locale}"/>
> 	</map:transform>
>       <map:serialize type="xhtml"/>
>     </map:match>
> </map:act>
> ...
> =================================================================
> 
> here is an excerpt of the sitemap.xmap in the test folder.
> 
> ...
> <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction">
>      <locale-attribute>locale</locale-attribute>
>      <use-locale>false</use-locale>
>      <default-locale language="fr" country="CA"/>
>      <store-in-request>true</store-in-request>
>      <create-session>true</create-session>
>      <store-in-session>true</store-in-session>
>      <store-in-cookie>false</store-in-cookie>
>    </map:action>
> </map:actions>
> ...
> <map:transformer name="i18n"
> src="org.apache.cocoon.transformation.I18nTransformer">
>      <catalogues default="default">
>        <catalogue id="default" name="messages"
> location="../translations/default"/>
>      </catalogues>
>      <untranslated-text>untranslated</untranslated-text>
>      <cache-at-startup>true</cache-at-startup>
>  </map:transformer>
> ...
> <map:act type = "locale">
>     <!-- welcome page -->
>     <map:match pattern="">
> 	<map:generate src="test.html"/>     
> 	<map:transform type = "i18n">
> 		<map:parameter name = "locale" value = 
> "{session-attr:locale}"/>
> 	</map:transform>
>       <map:serialize type="html"/>
>     </map:match>
> </map:act>
> ...
> =================================================================
> 
> Thanks in advance
> 
> Yves
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message