RE: Re : Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Martin Gainty

nm: 
a long hot summer day is thankfully over

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 14 Aug 2009 16:37:40 -0700
> Subject: Re: Re : Re : Re : Re : Struts2 + I18N
> From: musa...@gmail.com
> To: user@struts.apache.org
> 
> On Fri, Aug 14, 2009 at 4:31 PM, Martin Gainty wrote:
> > sounds expensive..will they take cc?
> 
> What in Apollo's holy name are you talking about?
> 
> musachy
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009

Re: Re : Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Musachy Barroso
On Fri, Aug 14, 2009 at 4:31 PM, Martin Gainty wrote:
> sounds expensive..will they take cc?

What in Apollo's holy name are you talking about?

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Re : Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Martin Gainty

sounds expensive..will they take cc?

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 14 Aug 2009 15:58:05 -0700
> Subject: Re: Re : Re : Re : Re : Struts2 + I18N
> From: musa...@gmail.com
> To: user@struts.apache.org
> 
> You need to fax an iCLA: http://www.apache.org/licenses/icla.txt and
> then someone can grant you access to the wiki.
> 
> musachy
> 
> On Fri, Aug 14, 2009 at 3:46 PM, Julien HENRY wrote:
> > I tried to edit the FAQ but I'm not allowed to do so.
> >
> > http://struts.apache.org/2.x/docs/faqs.html
> >
> >
> >
> >
> >
> > 
> > De : Musachy Barroso 
> > À : Struts Users Mailing List 
> > Envoyé le : Samedi, 15 Août 2009, 0h39mn 27s
> > Objet : Re: Re : Re : Re : Struts2 + I18N
> >
> > This would make a good FAQ if it is not there already.
> >
> > On Fri, Aug 14, 2009 at 3:25 PM, Julien HENRY wrote:
> >> Very, very hackish... but I like it ;)
> >>
> >> Thanks for this very good trick.
> >>
> >>
> >>
> >>
> >> 
> >> De : Chris Pratt 
> >> À : Struts Users Mailing List 
> >> Envoyé le : Samedi, 15 Août 2009, 0h13mn 19s
> >> Objet : Re: Re : Re : Struts2 + I18N
> >>
> >> One trick I've used in the past is to put an empty (usually containing a
> >> comment saying to look in default.properties) default_en.properties file in
> >> the application.  Since all entries roll up to the default.properties
> >> anyway, if the bundle loader finds the empty file, he gets all warm and
> >> fuzzy and everything just seems to work.
> >>  (*Chris*)
> >>
> >> On Fri, Aug 14, 2009 at 3:03 PM, Musachy Barroso  wrote:
> >>
> >>> There is a major refactoring planned for xwork's I18n, this should
> >>> probably be part of it. Rene you watching this?
> >>>
> >>> musachy
> >>>
> >>> On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
> >>> > After digging into Struts2 code, here is what I discovered: this bug is
> >>> simply caused by the normal behavior of getBundle (
> >>> http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
> >>> )
> >>> >
> >>> > Here is the explanation
> >>> >
> >>> > In my Struts2 application I have the following language files:
> >>> >
> >>> >
> >>> > default_de.properties
> >>> > default_fr.properties
> >>> > default.properties (contains EN)
> >>> >
> >>> > JVM Defaut Locale: fr_FR
> >>> >
> >>> >
> >>> > Scenario 1:
> >>> > struts.locale not set so fr_FR is the default
> >>> > When hitting the first action, default_fr.properties is used
> >>> > OK
> >>> >
> >>> > Scenario2:
> >>> > Now I want to switch to English so I append ?request_locale=en to the 
> >>> > URL
> >>> > According to getBundle algorithm:
> >>> >1) default_en.properties is looked but not found
> >>> >2) default_fr.properties is found and used
> >>> > KO
> >>> >
> >>> > Scenario 3:
> >>> > struts.locale is set to en_US
> >>> > When hitting the first action, we are in the same case as scenario 2
> >>> because JVM default is still fr_FR
> >>> >
> >>> > The issue lay in LocalizedTextUtil.findResourceBundle(String
> >>> > bundleName, Locale locale) because here we only know that the user
> >>> > wants the given locale but we have no idea of what is the fallback
> >>> > locale.
> >>> >
> >>> > Proposed solutions:
> >>> >
> >>> > 1) default.properties should always match JVM language. Because an
> >>> application may be developped for several country it means forcing default
> >>> JVM with -Duser.language=XX. But this is not a good solution because the
> >>> same JVM may host several applications with possibly different default
> >>> Locale.
> >>> >
> >>> > 2) Force JVM default locale on Struts startup to be equal to
> >>> struts.locale. The main concern is I'm not sure it will works fine with
> >>> multi-threading and 

Re: Re : Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Musachy Barroso
You need to fax an iCLA: http://www.apache.org/licenses/icla.txt and
then someone can grant you access to the wiki.

musachy

On Fri, Aug 14, 2009 at 3:46 PM, Julien HENRY wrote:
> I tried to edit the FAQ but I'm not allowed to do so.
>
> http://struts.apache.org/2.x/docs/faqs.html
>
>
>
>
>
> 
> De : Musachy Barroso 
> À : Struts Users Mailing List 
> Envoyé le : Samedi, 15 Août 2009, 0h39mn 27s
> Objet : Re: Re : Re : Re : Struts2 + I18N
>
> This would make a good FAQ if it is not there already.
>
> On Fri, Aug 14, 2009 at 3:25 PM, Julien HENRY wrote:
>> Very, very hackish... but I like it ;)
>>
>> Thanks for this very good trick.
>>
>>
>>
>>
>> 
>> De : Chris Pratt 
>> À : Struts Users Mailing List 
>> Envoyé le : Samedi, 15 Août 2009, 0h13mn 19s
>> Objet : Re: Re : Re : Struts2 + I18N
>>
>> One trick I've used in the past is to put an empty (usually containing a
>> comment saying to look in default.properties) default_en.properties file in
>> the application.  Since all entries roll up to the default.properties
>> anyway, if the bundle loader finds the empty file, he gets all warm and
>> fuzzy and everything just seems to work.
>>  (*Chris*)
>>
>> On Fri, Aug 14, 2009 at 3:03 PM, Musachy Barroso  wrote:
>>
>>> There is a major refactoring planned for xwork's I18n, this should
>>> probably be part of it. Rene you watching this?
>>>
>>> musachy
>>>
>>> On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
>>> > After digging into Struts2 code, here is what I discovered: this bug is
>>> simply caused by the normal behavior of getBundle (
>>> http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
>>> )
>>> >
>>> > Here is the explanation
>>> >
>>> > In my Struts2 application I have the following language files:
>>> >
>>> >
>>> > default_de.properties
>>> > default_fr.properties
>>> > default.properties (contains EN)
>>> >
>>> > JVM Defaut Locale: fr_FR
>>> >
>>> >
>>> > Scenario 1:
>>> > struts.locale not set so fr_FR is the default
>>> > When hitting the first action, default_fr.properties is used
>>> > OK
>>> >
>>> > Scenario2:
>>> > Now I want to switch to English so I append ?request_locale=en to the URL
>>> > According to getBundle algorithm:
>>> >    1) default_en.properties is looked but not found
>>> >    2) default_fr.properties is found and used
>>> > KO
>>> >
>>> > Scenario 3:
>>> > struts.locale is set to en_US
>>> > When hitting the first action, we are in the same case as scenario 2
>>> because JVM default is still fr_FR
>>> >
>>> > The issue lay in LocalizedTextUtil.findResourceBundle(String
>>> > bundleName, Locale locale) because here we only know that the user
>>> > wants the given locale but we have no idea of what is the fallback
>>> > locale.
>>> >
>>> > Proposed solutions:
>>> >
>>> > 1) default.properties should always match JVM language. Because an
>>> application may be developped for several country it means forcing default
>>> JVM with -Duser.language=XX. But this is not a good solution because the
>>> same JVM may host several applications with possibly different default
>>> Locale.
>>> >
>>> > 2) Force JVM default locale on Struts startup to be equal to
>>> struts.locale. The main concern is I'm not sure it will works fine with
>>> multi-threading and it will have many side effects (like changing language
>>> for stacktraces in the log)
>>> >
>>> > 3) Clean solution : have a clear separation between requested locale
>>> (with potentialy a default struts.default.request.locale) and default local
>>> (mean the locale that is contained in the resource bundle without
>>> extension). Then use the Java 1.6 feature (I know, I know, don't shout at
>>> me) ResourceBundle.Control that allow to change the fallback locale.
>>> >
>>> > Interesting read:
>>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
>>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146
>>> >
>>> > It seems that JSF implements its own lookup algorithm. IMHO this is the
>>> only solution if you don't want to use the JDK 1.6 feature
>>> ResourceBundle.Control.
>>> >
>>> >
>>> > Regards,
>>> >
>>> > Julien
>>> >
>>> >
>>> >
>>> >
>>> > 
>>> > De : "mailtolouis2020-str...@yahoo.com" <
>>> mailtolouis2020-str...@yahoo.com>
>>> > À : Struts Users Mailing List 
>>> > Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
>>> > Objet : Re: Re : Struts2 +  I18N
>>> >
>>> > Not long ago, someone also got similar problem:
>>> >
>>> >
>>> http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/
>>> >
>>> >
>>> >
>>> >
>>> > 
>>> > From: Julien HENRY 
>>> > To: Struts Users Mailing List 
>>> > Sent: Friday, Au

Re : Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Julien HENRY
I tried to edit the FAQ but I'm not allowed to do so.

http://struts.apache.org/2.x/docs/faqs.html






De : Musachy Barroso 
À : Struts Users Mailing List 
Envoyé le : Samedi, 15 Août 2009, 0h39mn 27s
Objet : Re: Re : Re : Re : Struts2 + I18N

This would make a good FAQ if it is not there already.

On Fri, Aug 14, 2009 at 3:25 PM, Julien HENRY wrote:
> Very, very hackish... but I like it ;)
>
> Thanks for this very good trick.
>
>
>
>
> 
> De : Chris Pratt 
> À : Struts Users Mailing List 
> Envoyé le : Samedi, 15 Août 2009, 0h13mn 19s
> Objet : Re: Re : Re : Struts2 + I18N
>
> One trick I've used in the past is to put an empty (usually containing a
> comment saying to look in default.properties) default_en.properties file in
> the application.  Since all entries roll up to the default.properties
> anyway, if the bundle loader finds the empty file, he gets all warm and
> fuzzy and everything just seems to work.
>  (*Chris*)
>
> On Fri, Aug 14, 2009 at 3:03 PM, Musachy Barroso  wrote:
>
>> There is a major refactoring planned for xwork's I18n, this should
>> probably be part of it. Rene you watching this?
>>
>> musachy
>>
>> On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
>> > After digging into Struts2 code, here is what I discovered: this bug is
>> simply caused by the normal behavior of getBundle (
>> http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
>> )
>> >
>> > Here is the explanation
>> >
>> > In my Struts2 application I have the following language files:
>> >
>> >
>> > default_de.properties
>> > default_fr.properties
>> > default.properties (contains EN)
>> >
>> > JVM Defaut Locale: fr_FR
>> >
>> >
>> > Scenario 1:
>> > struts.locale not set so fr_FR is the default
>> > When hitting the first action, default_fr.properties is used
>> > OK
>> >
>> > Scenario2:
>> > Now I want to switch to English so I append ?request_locale=en to the URL
>> > According to getBundle algorithm:
>> >1) default_en.properties is looked but not found
>> >2) default_fr.properties is found and used
>> > KO
>> >
>> > Scenario 3:
>> > struts.locale is set to en_US
>> > When hitting the first action, we are in the same case as scenario 2
>> because JVM default is still fr_FR
>> >
>> > The issue lay in LocalizedTextUtil.findResourceBundle(String
>> > bundleName, Locale locale) because here we only know that the user
>> > wants the given locale but we have no idea of what is the fallback
>> > locale.
>> >
>> > Proposed solutions:
>> >
>> > 1) default.properties should always match JVM language. Because an
>> application may be developped for several country it means forcing default
>> JVM with -Duser.language=XX. But this is not a good solution because the
>> same JVM may host several applications with possibly different default
>> Locale.
>> >
>> > 2) Force JVM default locale on Struts startup to be equal to
>> struts.locale. The main concern is I'm not sure it will works fine with
>> multi-threading and it will have many side effects (like changing language
>> for stacktraces in the log)
>> >
>> > 3) Clean solution : have a clear separation between requested locale
>> (with potentialy a default struts.default.request.locale) and default local
>> (mean the locale that is contained in the resource bundle without
>> extension). Then use the Java 1.6 feature (I know, I know, don't shout at
>> me) ResourceBundle.Control that allow to change the fallback locale.
>> >
>> > Interesting read:
>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146
>> >
>> > It seems that JSF implements its own lookup algorithm. IMHO this is the
>> only solution if you don't want to use the JDK 1.6 feature
>> ResourceBundle.Control.
>> >
>> >
>> > Regards,
>> >
>> > Julien
>> >
>> >
>> >
>> >
>> > 
>> > De : "mailtolouis2020-str...@yahoo.com" <
>> mailtolouis2020-str...@yahoo.com>
>> > À : Struts Users Mailing List 
>> > Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
>> > Objet : Re: Re : Struts2 +  I18N
>> >
>> > Not long ago, someone also got similar problem:
>> >
>> >
>> http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/
>> >
>> >
>> >
>> >
>> > 
>> > From: Julien HENRY 
>> > To: Struts Users Mailing List 
>> > Sent: Friday, August 14, 2009 4:52:28 PM
>> > Subject: Re : Struts2 +  I18N
>> >
>> > Hi,
>> >
>> > AFAIK this is the same as adding > value="en" /> in struts.xml.
>> >
>> > BTW I tried your suggestion without much improvement.
>> >
>> > I even tried to rename default.properties in default_en.properties =>
>> still no english.
>> >
>> >
>> 

Re: Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Musachy Barroso
This would make a good FAQ if it is not there already.

On Fri, Aug 14, 2009 at 3:25 PM, Julien HENRY wrote:
> Very, very hackish... but I like it ;)
>
> Thanks for this very good trick.
>
>
>
>
> 
> De : Chris Pratt 
> À : Struts Users Mailing List 
> Envoyé le : Samedi, 15 Août 2009, 0h13mn 19s
> Objet : Re: Re : Re : Struts2 + I18N
>
> One trick I've used in the past is to put an empty (usually containing a
> comment saying to look in default.properties) default_en.properties file in
> the application.  Since all entries roll up to the default.properties
> anyway, if the bundle loader finds the empty file, he gets all warm and
> fuzzy and everything just seems to work.
>  (*Chris*)
>
> On Fri, Aug 14, 2009 at 3:03 PM, Musachy Barroso  wrote:
>
>> There is a major refactoring planned for xwork's I18n, this should
>> probably be part of it. Rene you watching this?
>>
>> musachy
>>
>> On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
>> > After digging into Struts2 code, here is what I discovered: this bug is
>> simply caused by the normal behavior of getBundle (
>> http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
>> )
>> >
>> > Here is the explanation
>> >
>> > In my Struts2 application I have the following language files:
>> >
>> >
>> > default_de.properties
>> > default_fr.properties
>> > default.properties (contains EN)
>> >
>> > JVM Defaut Locale: fr_FR
>> >
>> >
>> > Scenario 1:
>> > struts.locale not set so fr_FR is the default
>> > When hitting the first action, default_fr.properties is used
>> > OK
>> >
>> > Scenario2:
>> > Now I want to switch to English so I append ?request_locale=en to the URL
>> > According to getBundle algorithm:
>> >    1) default_en.properties is looked but not found
>> >    2) default_fr.properties is found and used
>> > KO
>> >
>> > Scenario 3:
>> > struts.locale is set to en_US
>> > When hitting the first action, we are in the same case as scenario 2
>> because JVM default is still fr_FR
>> >
>> > The issue lay in LocalizedTextUtil.findResourceBundle(String
>> > bundleName, Locale locale) because here we only know that the user
>> > wants the given locale but we have no idea of what is the fallback
>> > locale.
>> >
>> > Proposed solutions:
>> >
>> > 1) default.properties should always match JVM language. Because an
>> application may be developped for several country it means forcing default
>> JVM with -Duser.language=XX. But this is not a good solution because the
>> same JVM may host several applications with possibly different default
>> Locale.
>> >
>> > 2) Force JVM default locale on Struts startup to be equal to
>> struts.locale. The main concern is I'm not sure it will works fine with
>> multi-threading and it will have many side effects (like changing language
>> for stacktraces in the log)
>> >
>> > 3) Clean solution : have a clear separation between requested locale
>> (with potentialy a default struts.default.request.locale) and default local
>> (mean the locale that is contained in the resource bundle without
>> extension). Then use the Java 1.6 feature (I know, I know, don't shout at
>> me) ResourceBundle.Control that allow to change the fallback locale.
>> >
>> > Interesting read:
>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146
>> >
>> > It seems that JSF implements its own lookup algorithm. IMHO this is the
>> only solution if you don't want to use the JDK 1.6 feature
>> ResourceBundle.Control.
>> >
>> >
>> > Regards,
>> >
>> > Julien
>> >
>> >
>> >
>> >
>> > 
>> > De : "mailtolouis2020-str...@yahoo.com" <
>> mailtolouis2020-str...@yahoo.com>
>> > À : Struts Users Mailing List 
>> > Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
>> > Objet : Re: Re : Struts2 +  I18N
>> >
>> > Not long ago, someone also got similar problem:
>> >
>> >
>> http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/
>> >
>> >
>> >
>> >
>> > 
>> > From: Julien HENRY 
>> > To: Struts Users Mailing List 
>> > Sent: Friday, August 14, 2009 4:52:28 PM
>> > Subject: Re : Struts2 +  I18N
>> >
>> > Hi,
>> >
>> > AFAIK this is the same as adding > value="en" /> in struts.xml.
>> >
>> > BTW I tried your suggestion without much improvement.
>> >
>> > I even tried to rename default.properties in default_en.properties =>
>> still no english.
>> >
>> >
>> >
>> >
>> > 
>> > De : BALAJI CRB 
>> > À : Struts Users Mailing List 
>> > Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
>> > Objet : RE: Struts2 +  I18N
>> >
>> > Hi,
>> >
>> >
>> >
>> > Use struts.locale=en   in your struts.properties file. 

Re : Re : Re : Struts2 + I18N

2009-08-14 Thread Julien HENRY
Very, very hackish... but I like it ;)

Thanks for this very good trick.





De : Chris Pratt 
À : Struts Users Mailing List 
Envoyé le : Samedi, 15 Août 2009, 0h13mn 19s
Objet : Re: Re : Re : Struts2 + I18N

One trick I've used in the past is to put an empty (usually containing a
comment saying to look in default.properties) default_en.properties file in
the application.  Since all entries roll up to the default.properties
anyway, if the bundle loader finds the empty file, he gets all warm and
fuzzy and everything just seems to work.
  (*Chris*)

On Fri, Aug 14, 2009 at 3:03 PM, Musachy Barroso  wrote:

> There is a major refactoring planned for xwork's I18n, this should
> probably be part of it. Rene you watching this?
>
> musachy
>
> On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
> > After digging into Struts2 code, here is what I discovered: this bug is
> simply caused by the normal behavior of getBundle (
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
> )
> >
> > Here is the explanation
> >
> > In my Struts2 application I have the following language files:
> >
> >
> > default_de.properties
> > default_fr.properties
> > default.properties (contains EN)
> >
> > JVM Defaut Locale: fr_FR
> >
> >
> > Scenario 1:
> > struts.locale not set so fr_FR is the default
> > When hitting the first action, default_fr.properties is used
> > OK
> >
> > Scenario2:
> > Now I want to switch to English so I append ?request_locale=en to the URL
> > According to getBundle algorithm:
> >1) default_en.properties is looked but not found
> >2) default_fr.properties is found and used
> > KO
> >
> > Scenario 3:
> > struts.locale is set to en_US
> > When hitting the first action, we are in the same case as scenario 2
> because JVM default is still fr_FR
> >
> > The issue lay in LocalizedTextUtil.findResourceBundle(String
> > bundleName, Locale locale) because here we only know that the user
> > wants the given locale but we have no idea of what is the fallback
> > locale.
> >
> > Proposed solutions:
> >
> > 1) default.properties should always match JVM language. Because an
> application may be developped for several country it means forcing default
> JVM with -Duser.language=XX. But this is not a good solution because the
> same JVM may host several applications with possibly different default
> Locale.
> >
> > 2) Force JVM default locale on Struts startup to be equal to
> struts.locale. The main concern is I'm not sure it will works fine with
> multi-threading and it will have many side effects (like changing language
> for stacktraces in the log)
> >
> > 3) Clean solution : have a clear separation between requested locale
> (with potentialy a default struts.default.request.locale) and default local
> (mean the locale that is contained in the resource bundle without
> extension). Then use the Java 1.6 feature (I know, I know, don't shout at
> me) ResourceBundle.Control that allow to change the fallback locale.
> >
> > Interesting read:
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146
> >
> > It seems that JSF implements its own lookup algorithm. IMHO this is the
> only solution if you don't want to use the JDK 1.6 feature
> ResourceBundle.Control.
> >
> >
> > Regards,
> >
> > Julien
> >
> >
> >
> >
> > 
> > De : "mailtolouis2020-str...@yahoo.com" <
> mailtolouis2020-str...@yahoo.com>
> > À : Struts Users Mailing List 
> > Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
> > Objet : Re: Re : Struts2 +  I18N
> >
> > Not long ago, someone also got similar problem:
> >
> >
> http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/
> >
> >
> >
> >
> > 
> > From: Julien HENRY 
> > To: Struts Users Mailing List 
> > Sent: Friday, August 14, 2009 4:52:28 PM
> > Subject: Re : Struts2 +  I18N
> >
> > Hi,
> >
> > AFAIK this is the same as adding  value="en" /> in struts.xml.
> >
> > BTW I tried your suggestion without much improvement.
> >
> > I even tried to rename default.properties in default_en.properties =>
> still no english.
> >
> >
> >
> >
> > 
> > De : BALAJI CRB 
> > À : Struts Users Mailing List 
> > Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
> > Objet : RE: Struts2 +  I18N
> >
> > Hi,
> >
> >
> >
> > Use struts.locale=en   in your struts.properties file. Hope this works.
> >
> > Regards,
> >
> > Balaji C R B
> >
> >
> >
> > -Original Message-
> > From: Julien HENRY [mailto:henr...@yahoo.fr]
> > Sent: Friday, August 14, 2009 9:11 PM
> > To: user@struts.apache.org
> > Subject: Struts2 + I18N
> >
> >
> >
> > Hi,
>

Re: Struts2 + I18N

2009-08-14 Thread Dale Newfield

Chris Pratt wrote:

One trick I've used in the past is to put an empty (usually containing a
comment saying to look in default.properties) default_en.properties file in
the application.  Since all entries roll up to the default.properties
anyway, if the bundle loader finds the empty file, he gets all warm and
fuzzy and everything just seems to work.


My (appfuse kickstarted) app does that too, referencing the second 
comment of Matt Raible's blog entry:


http://raibledesigns.com/rd/entry/i18n_synching_up_struts_and

Which is where Chris found his solution, since he commented there on 
September 13, 2006 :-)


-Dale

P.S.:  [OT], but it's Friday ;-)

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Re : Re : Struts2 + I18N

2009-08-14 Thread Chris Pratt
One trick I've used in the past is to put an empty (usually containing a
comment saying to look in default.properties) default_en.properties file in
the application.  Since all entries roll up to the default.properties
anyway, if the bundle loader finds the empty file, he gets all warm and
fuzzy and everything just seems to work.
  (*Chris*)

On Fri, Aug 14, 2009 at 3:03 PM, Musachy Barroso  wrote:

> There is a major refactoring planned for xwork's I18n, this should
> probably be part of it. Rene you watching this?
>
> musachy
>
> On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
> > After digging into Struts2 code, here is what I discovered: this bug is
> simply caused by the normal behavior of getBundle (
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
> )
> >
> > Here is the explanation
> >
> > In my Struts2 application I have the following language files:
> >
> >
> > default_de.properties
> > default_fr.properties
> > default.properties (contains EN)
> >
> > JVM Defaut Locale: fr_FR
> >
> >
> > Scenario 1:
> > struts.locale not set so fr_FR is the default
> > When hitting the first action, default_fr.properties is used
> > OK
> >
> > Scenario2:
> > Now I want to switch to English so I append ?request_locale=en to the URL
> > According to getBundle algorithm:
> >1) default_en.properties is looked but not found
> >2) default_fr.properties is found and used
> > KO
> >
> > Scenario 3:
> > struts.locale is set to en_US
> > When hitting the first action, we are in the same case as scenario 2
> because JVM default is still fr_FR
> >
> > The issue lay in LocalizedTextUtil.findResourceBundle(String
> > bundleName, Locale locale) because here we only know that the user
> > wants the given locale but we have no idea of what is the fallback
> > locale.
> >
> > Proposed solutions:
> >
> > 1) default.properties should always match JVM language. Because an
> application may be developped for several country it means forcing default
> JVM with -Duser.language=XX. But this is not a good solution because the
> same JVM may host several applications with possibly different default
> Locale.
> >
> > 2) Force JVM default locale on Struts startup to be equal to
> struts.locale. The main concern is I'm not sure it will works fine with
> multi-threading and it will have many side effects (like changing language
> for stacktraces in the log)
> >
> > 3) Clean solution : have a clear separation between requested locale
> (with potentialy a default struts.default.request.locale) and default local
> (mean the locale that is contained in the resource bundle without
> extension). Then use the Java 1.6 feature (I know, I know, don't shout at
> me) ResourceBundle.Control that allow to change the fallback locale.
> >
> > Interesting read:
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146
> >
> > It seems that JSF implements its own lookup algorithm. IMHO this is the
> only solution if you don't want to use the JDK 1.6 feature
> ResourceBundle.Control.
> >
> >
> > Regards,
> >
> > Julien
> >
> >
> >
> >
> > 
> > De : "mailtolouis2020-str...@yahoo.com" <
> mailtolouis2020-str...@yahoo.com>
> > À : Struts Users Mailing List 
> > Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
> > Objet : Re: Re : Struts2 +  I18N
> >
> > Not long ago, someone also got similar problem:
> >
> >
> http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/
> >
> >
> >
> >
> > 
> > From: Julien HENRY 
> > To: Struts Users Mailing List 
> > Sent: Friday, August 14, 2009 4:52:28 PM
> > Subject: Re : Struts2 +  I18N
> >
> > Hi,
> >
> > AFAIK this is the same as adding  value="en" /> in struts.xml.
> >
> > BTW I tried your suggestion without much improvement.
> >
> > I even tried to rename default.properties in default_en.properties =>
> still no english.
> >
> >
> >
> >
> > 
> > De : BALAJI CRB 
> > À : Struts Users Mailing List 
> > Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
> > Objet : RE: Struts2 +  I18N
> >
> > Hi,
> >
> >
> >
> > Use struts.locale=en   in your struts.properties file. Hope this works.
> >
> > Regards,
> >
> > Balaji C R B
> >
> >
> >
> > -Original Message-
> > From: Julien HENRY [mailto:henr...@yahoo.fr]
> > Sent: Friday, August 14, 2009 9:11 PM
> > To: user@struts.apache.org
> > Subject: Struts2 + I18N
> >
> >
> >
> > Hi,
> >
> >
> >
> > In my Struts2 application I have the following language files:
> >
> >
> >
> > default_de.properties
> >
> > default_fr.properties
> >
> > default.properties (contains EN)
> >
> >
> >
> > When I start my application, the applic

Re: Re : Re : Struts2 + I18N

2009-08-14 Thread Musachy Barroso
There is a major refactoring planned for xwork's I18n, this should
probably be part of it. Rene you watching this?

musachy

On Fri, Aug 14, 2009 at 2:16 PM, Julien HENRY wrote:
> After digging into Struts2 code, here is what I discovered: this bug is 
> simply caused by the normal behavior of getBundle 
> (http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader))
>
> Here is the explanation
>
> In my Struts2 application I have the following language files:
>
>
> default_de.properties
> default_fr.properties
> default.properties (contains EN)
>
> JVM Defaut Locale: fr_FR
>
>
> Scenario 1:
> struts.locale not set so fr_FR is the default
> When hitting the first action, default_fr.properties is used
> OK
>
> Scenario2:
> Now I want to switch to English so I append ?request_locale=en to the URL
> According to getBundle algorithm:
>    1) default_en.properties is looked but not found
>    2) default_fr.properties is found and used
> KO
>
> Scenario 3:
> struts.locale is set to en_US
> When hitting the first action, we are in the same case as scenario 2 because 
> JVM default is still fr_FR
>
> The issue lay in LocalizedTextUtil.findResourceBundle(String
> bundleName, Locale locale) because here we only know that the user
> wants the given locale but we have no idea of what is the fallback
> locale.
>
> Proposed solutions:
>
> 1) default.properties should always match JVM language. Because an 
> application may be developped for several country it means forcing default 
> JVM with -Duser.language=XX. But this is not a good solution because the same 
> JVM may host several applications with possibly different default Locale.
>
> 2) Force JVM default locale on Struts startup to be equal to struts.locale. 
> The main concern is I'm not sure it will works fine with multi-threading and 
> it will have many side effects (like changing language for stacktraces in the 
> log)
>
> 3) Clean solution : have a clear separation between requested locale (with 
> potentialy a default struts.default.request.locale) and default local (mean 
> the locale that is contained in the resource bundle without extension). Then 
> use the Java 1.6 feature (I know, I know, don't shout at me) 
> ResourceBundle.Control that allow to change the fallback locale.
>
> Interesting read:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146
>
> It seems that JSF implements its own lookup algorithm. IMHO this is the only 
> solution if you don't want to use the JDK 1.6 feature ResourceBundle.Control.
>
>
> Regards,
>
> Julien
>
>
>
>
> 
> De : "mailtolouis2020-str...@yahoo.com" 
> À : Struts Users Mailing List 
> Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
> Objet : Re: Re : Struts2 +  I18N
>
> Not long ago, someone also got similar problem:
>
> http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/
>
>
>
>
> 
> From: Julien HENRY 
> To: Struts Users Mailing List 
> Sent: Friday, August 14, 2009 4:52:28 PM
> Subject: Re : Struts2 +  I18N
>
> Hi,
>
> AFAIK this is the same as adding  
> in struts.xml.
>
> BTW I tried your suggestion without much improvement.
>
> I even tried to rename default.properties in default_en.properties => still 
> no english.
>
>
>
>
> 
> De : BALAJI CRB 
> À : Struts Users Mailing List 
> Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
> Objet : RE: Struts2 +  I18N
>
> Hi,
>
>
>
> Use struts.locale=en   in your struts.properties file. Hope this works.
>
> Regards,
>
> Balaji C R B
>
>
>
> -Original Message-
> From: Julien HENRY [mailto:henr...@yahoo.fr]
> Sent: Friday, August 14, 2009 9:11 PM
> To: user@struts.apache.org
> Subject: Struts2 + I18N
>
>
>
> Hi,
>
>
>
> In my Struts2 application I have the following language files:
>
>
>
> default_de.properties
>
> default_fr.properties
>
> default.properties (contains EN)
>
>
>
> When I start my application, the application is in French (probably because 
> JVM default locale is french). Then I tried to change language by appending 
> ?request_locale=XX in the URL.
>
>
>
> Adding ?request_locale=de works fine. All texts are in German.
>
>
>
> Adding ?request_locale=en doesn't work. All texts are in French.
>
>
>
> I tried to add
>
> 
>
> to struts.xml but no luck.
>
>
>
> How can I tell Struts that the default.properties file is English?
>
>
>
> Thanks,
>
>
>
> Julien
>
>
>
>
>
>
>
>
> DISCLAIMER:
>
> This email message and all attachments are  confidential and may contain 
> information that
> is privileged,  confidential or exempt from  disclosure under applicable law. 
>  If you are
> not  the intended  recipient,  you  are notified  that any dissemination, 
> distribution or
> copying  of this email  is strictly prohibited. If you have received this 
> email in 

Re : Re : Struts2 + I18N

2009-08-14 Thread Julien HENRY
After digging into Struts2 code, here is what I discovered: this bug is simply 
caused by the normal behavior of getBundle 
(http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader))

Here is the explanation

In my Struts2 application I have the following language files:


default_de.properties
default_fr.properties
default.properties (contains EN)

JVM Defaut Locale: fr_FR


Scenario 1:
struts.locale not set so fr_FR is the default
When hitting the first action, default_fr.properties is used
OK

Scenario2:
Now I want to switch to English so I append ?request_locale=en to the URL
According to getBundle algorithm:
1) default_en.properties is looked but not found
2) default_fr.properties is found and used
KO

Scenario 3:
struts.locale is set to en_US
When hitting the first action, we are in the same case as scenario 2 because 
JVM default is still fr_FR

The issue lay in LocalizedTextUtil.findResourceBundle(String
bundleName, Locale locale) because here we only know that the user
wants the given locale but we have no idea of what is the fallback
locale.

Proposed solutions:

1) default.properties should always match JVM language. Because an application 
may be developped for several country it means forcing default JVM with 
-Duser.language=XX. But this is not a good solution because the same JVM may 
host several applications with possibly different default Locale.

2) Force JVM default locale on Struts startup to be equal to struts.locale. The 
main concern is I'm not sure it will works fine with multi-threading and it 
will have many side effects (like changing language for stacktraces in the log)

3) Clean solution : have a clear separation between requested locale (with 
potentialy a default struts.default.request.locale) and default local (mean the 
locale that is contained in the resource bundle without extension). Then use 
the Java 1.6 feature (I know, I know, don't shout at me) ResourceBundle.Control 
that allow to change the fallback locale.

Interesting read:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086301
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4303146

It seems that JSF implements its own lookup algorithm. IMHO this is the only 
solution if you don't want to use the JDK 1.6 feature ResourceBundle.Control.


Regards,

Julien





De : "mailtolouis2020-str...@yahoo.com" 
À : Struts Users Mailing List 
Envoyé le : Vendredi, 14 Août 2009, 18h12mn 52s
Objet : Re: Re : Struts2 +  I18N

Not long ago, someone also got similar problem:

http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/





From: Julien HENRY 
To: Struts Users Mailing List 
Sent: Friday, August 14, 2009 4:52:28 PM
Subject: Re : Struts2 +  I18N

Hi,

AFAIK this is the same as adding  
in struts.xml.

BTW I tried your suggestion without much improvement.

I even tried to rename default.properties in default_en.properties => still no 
english.





De : BALAJI CRB 
À : Struts Users Mailing List 
Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
Objet : RE: Struts2 +  I18N

Hi,



Use struts.locale=en   in your struts.properties file. Hope this works.

Regards,

Balaji C R B



-Original Message-
From: Julien HENRY [mailto:henr...@yahoo.fr]
Sent: Friday, August 14, 2009 9:11 PM
To: user@struts.apache.org
Subject: Struts2 + I18N



Hi,



In my Struts2 application I have the following language files:



default_de.properties

default_fr.properties

default.properties (contains EN)



When I start my application, the application is in French (probably because JVM 
default locale is french). Then I tried to change language by appending 
?request_locale=XX in the URL.



Adding ?request_locale=de works fine. All texts are in German.



Adding ?request_locale=en doesn't work. All texts are in French.



I tried to add



to struts.xml but no luck.



How can I tell Struts that the default.properties file is English?



Thanks,



Julien








DISCLAIMER:

This email message and all attachments are  confidential and may contain 
information that
is privileged,  confidential or exempt from  disclosure under applicable law.  
If you are
not  the intended  recipient,  you  are notified  that any dissemination, 
distribution or 
copying  of this email  is strictly prohibited. If you have received this email 
in error, 
please notify us immediately by return email or to mailad...@spanservices.com 
and destroy 
the original message.

Opinions, conclusions, and other  information in  this message that  do not 
relate to the 
official business of SPAN, shall be understood to be neither given nor endorsed 
by SPAN.


  

JSON Plugin

2009-08-14 Thread Musachy Barroso
FYI the JSON Plugin(http://code.google.com/p/jsonplugin/) is now part
of Struts and will be released in 2.1.8. The code at Google Code will
not be maintained any more. Applications using this plugin should
continue to work as is, by just replacing the plugin jar. The code is
here:

http://svn.apache.org/repos/asf/struts/struts2/trunk/plugins/json/

give it a try and report any problems.

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Problem trying to access page.

2009-08-14 Thread Musachy Barroso
Looks like you have duplicated jars in the classpath, or there is
something is a problem with class loading (Spring getting loaded by a
different classloader than the one that is loading the webapp, or
something like that)

musachy

On Fri, Aug 14, 2009 at 8:05 AM, Bruno wrote:
> Hey guys.
>
> We have changed WAS to WAS 64 bits version and we couldn't access any page.
>
> Follow the log exc for each time we tried to access it:
>
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.
> InvocationTargetException
> at
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:295)
> at
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:431)
> at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:492)
> ... 51 more
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
> at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
> at
> com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:462)
> at
> com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:477)
> at
> com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:34)
> at
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:293)
> ... 53 more
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)
> at
> com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)
> at
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)
> at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)
> at
> com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
> at
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
> ... 58 more
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> at
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:440)
> at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:492)
> ... 63 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
> at
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:419)
> ... 64 more
> Caused by: java.lang.ClassCastException:
> org.springframework.beans.factory.BeanCreationException incompatible with
> org.springframework.context.ApplicationContext
> at
> org.apache.struts2.spring.StrutsSpringObjectFactory.(StrutsSpringObjectFactory.java:76)
> ... 69 more
>
>
>
> --
> Bruno Morelli Vargas
> Mail: brun...@gmail.com
> Msn: brun...@hotmail.com
> Icq: 165055101
> Skype: morellibmv
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Re : Struts2 + I18N

2009-08-14 Thread mailtolouis2020-struts
Not long ago, someone also got similar problem:

http://markmail.org/message/mozukqgrnhfbq7od?q=s2+and+default+locale/language+list:org.apache.struts.users/





From: Julien HENRY 
To: Struts Users Mailing List 
Sent: Friday, August 14, 2009 4:52:28 PM
Subject: Re : Struts2 +  I18N

Hi,

AFAIK this is the same as adding  
in struts.xml.

BTW I tried your suggestion without much improvement.

I even tried to rename default.properties in default_en.properties => still no 
english.





De : BALAJI CRB 
À : Struts Users Mailing List 
Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
Objet : RE: Struts2 +  I18N

Hi,



Use struts.locale=en   in your struts.properties file. Hope this works.

Regards,

Balaji C R B



-Original Message-
From: Julien HENRY [mailto:henr...@yahoo.fr]
Sent: Friday, August 14, 2009 9:11 PM
To: user@struts.apache.org
Subject: Struts2 + I18N



Hi,



In my Struts2 application I have the following language files:



default_de.properties

default_fr.properties

default.properties (contains EN)



When I start my application, the application is in French (probably because JVM 
default locale is french). Then I tried to change language by appending 
?request_locale=XX in the URL.



Adding ?request_locale=de works fine. All texts are in German.



Adding ?request_locale=en doesn't work. All texts are in French.



I tried to add



to struts.xml but no luck.



How can I tell Struts that the default.properties file is English?



Thanks,



Julien








DISCLAIMER:

This email message and all attachments are  confidential and may contain 
information that
is privileged,  confidential or exempt from  disclosure under applicable law.  
If you are
not  the intended  recipient,  you  are notified  that any dissemination, 
distribution or 
copying  of this email  is strictly prohibited. If you have received this email 
in error, 
please notify us immediately by return email or to mailad...@spanservices.com 
and destroy 
the original message.

Opinions, conclusions, and other  information in  this message that  do not 
relate to the 
official business of SPAN, shall be understood to be neither given nor endorsed 
by SPAN.

LoggingInterceptor

2009-08-14 Thread Louis Voo
HI,

I tried the LoggingInterceptor, it print

2009-08-14 16:26:02,062 INFO  
com.opensymphony.xwork2.interceptor.LoggingInterceptor.info:31 - Starting 
execution stack for action /louis/excludeParam/excludeParam

Is it possible to print the actual class name like this?

2009-08-14 16:26:02,078 DEBUG louis.demo.action.ExcludeParamAction.input:57 - 
Begining input
2009-08-14 16:26:02,078 DEBUG louis.demo.action.ExcludeParamAction.input:58 - 
End input

Thanks
Louis


Using accept-language header as default language

2009-08-14 Thread Julien HENRY
Hi,

Is there already something in Struts2 allowing to use accept-language header as 
a default language when an user first connect to my application?

I think it could be an option of the I18N interceptor but I can't manage to 
find any information on that.

Suggestion?

Regards,

Julien



  

Re : Struts2 + I18N

2009-08-14 Thread Julien HENRY
Hi,

AFAIK this is the same as adding  
in struts.xml.

BTW I tried your suggestion without much improvement.

I even tried to rename default.properties in default_en.properties => still no 
english.





De : BALAJI CRB 
À : Struts Users Mailing List 
Envoyé le : Vendredi, 14 Août 2009, 17h47mn 37s
Objet : RE: Struts2 +  I18N

Hi,



Use struts.locale=en   in your struts.properties file. Hope this works.

Regards,

Balaji C R B



-Original Message-
From: Julien HENRY [mailto:henr...@yahoo.fr]
Sent: Friday, August 14, 2009 9:11 PM
To: user@struts.apache.org
Subject: Struts2 + I18N



Hi,



In my Struts2 application I have the following language files:



default_de.properties

default_fr.properties

default.properties (contains EN)



When I start my application, the application is in French (probably because JVM 
default locale is french). Then I tried to change language by appending 
?request_locale=XX in the URL.



Adding ?request_locale=de works fine. All texts are in German.



Adding ?request_locale=en doesn't work. All texts are in French.



I tried to add



to struts.xml but no luck.



How can I tell Struts that the default.properties file is English?



Thanks,



Julien








DISCLAIMER:

This email message and all attachments are  confidential and may contain 
information that
is privileged,  confidential or exempt from  disclosure under applicable law.  
If you are
not  the intended  recipient,  you  are notified  that any dissemination, 
distribution or 
copying  of this email  is strictly prohibited. If you have received this email 
in error, 
please notify us immediately by return email or to mailad...@spanservices.com 
and destroy 
the original message.

Opinions, conclusions, and other  information in  this message that  do not 
relate to the 
official business of SPAN, shall be understood to be neither given nor endorsed 
by SPAN.



  

RE: Struts2 + I18N

2009-08-14 Thread BALAJI CRB
Hi,



Use struts.locale=en   in your struts.properties file. Hope this works.

Regards,

Balaji C R B



-Original Message-
From: Julien HENRY [mailto:henr...@yahoo.fr]
Sent: Friday, August 14, 2009 9:11 PM
To: user@struts.apache.org
Subject: Struts2 + I18N



Hi,



In my Struts2 application I have the following language files:



default_de.properties

default_fr.properties

default.properties (contains EN)



When I start my application, the application is in French (probably because JVM 
default locale is french). Then I tried to change language by appending 
?request_locale=XX in the URL.



Adding ?request_locale=de works fine. All texts are in German.



Adding ?request_locale=en doesn't work. All texts are in French.



I tried to add



to struts.xml but no luck.



How can I tell Struts that the default.properties file is English?



Thanks,



Julien








DISCLAIMER:

This email message and all attachments are  confidential and may contain 
information that
is privileged,  confidential or exempt from  disclosure under applicable law.  
If you are
not  the intended  recipient,  you  are notified  that any dissemination, 
distribution or 
copying  of this email  is strictly prohibited. If you have received this email 
in error, 
please notify us immediately by return email or to mailad...@spanservices.com 
and destroy 
the original message.

Opinions, conclusions, and other  information in  this message that  do not 
relate to the 
official business of SPAN, shall be understood to be neither given nor endorsed 
by SPAN.


RE: Impossible to start two Struts 2 apps at the same time on Tomcat 6

2009-08-14 Thread David T. Webb
You need to set Tomcat for UCL (Unified Class Loading).

Package your struts jar files in the WAR, and NOT in the Tomcat server 
classpath.

I have apps running in the same container with different versions of struts.

--
Sincerely,
David Webb, President
BrightMove, Inc. 
http://www.brightmove.com
320 High Tide Dr, Suite 101B
Saint Augustine Beach, FL 32080
(904) 861-2396
(866) 895-6299 (Fax)


-Original Message-
From: Wes Wannemacher [mailto:w...@wantii.com] 
Sent: Friday, August 14, 2009 11:37 AM
To: Struts Users Mailing List
Subject: Re: Impossible to start two Struts 2 apps at the same time on Tomcat 6

Just curious, where are the struts-*.jar files? I vaguely remember a
classloader issue if you are trying to put the jars in one of Tomcat's
shared jar folders.

-Wes

On Fri, Aug 14, 2009 at 11:00 AM, HENRY Pierre wrote:
> Hi,
>
> I have 2 separate Struts 2 webapps, based both on Struts 2.1.6.
>
> Both webapps work fine when deployed separately on Tomcat 6.0.18. But when I 
> deploy both at the same time on the same Tomcat, one is working (the first 
> one alphabetically) and the seconds doesn’t start up, it gives me the 
> infamous  ‘SEVERE : error filterStart’ in the logs, and not much more 
> meaningful information as to why it’s crashing. (I set the log level to DEBUG 
> for the struts2 and xworks2 packages in log4j).
>
> If I comment out the struts 2 filter and filter mapping segments in the 
> web.xml of the second webapp, then the webapp starts without error (but of 
> course it doesn’t work), that’s why I think the problem is related to having 
> 2 Struts 2 webapps together.
>
> Thanks for any advice. I would like to at least have a stack trace…
>
> My config :
> Vista 64
> Tomcat 6.0.18
> Struts 2.1.6
> Besides that my apps also use Hibernate, Quartz, Tiles…
>
> Pierre
>
>
>
> The log of Tomcat’s startup :
>
> Listening for transport dt_socket at address: 
> 14 ao¹t 2009 15:53:14 org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not fou
> nd on the java.library.path: c:\Program Files 
> (x86)\Java\jdk1.6.0_13\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C
> :\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program 
> Files\Intel\DMIX;C:\Program Files (x86)\Com
> mon Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio 
> Shared\DLLShared;C:\Program Files (x86)\Commo
> n Files\Roxio 
> Shared\9.0\DLLShared;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program 
> Files (x86)\WinSCP\;C:\Program
> Files\SlikSvn\bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files 
> (x86)\CVSNT\
> 14 ao¹t 2009 15:53:14 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 14 ao¹t 2009 15:53:14 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 319 ms
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardService start
> INFO: D´┐¢marrage du service Catalina
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
> 15:53:15,755 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,760 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,793 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,796 - [thread:main] 
> org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
> WARN:'Cannot find TilesRequestContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Initializing filter...'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Obtaining SessionFactory from static HibernateUtil singleton'
> 15:53:19,482 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateUtil.()
> DEBUG:'Hibernate session factory created.'
> 15:53:19,502 - [thread:main] 
> ch.unine.sitel.bipeadmin.struts.security.SecurityInterceptor.init()
> INFO:'Intializing the securityInterceptor.'
> 15:53:19,506 - [thread:main] 
> ch.unine.sitel.bipeadmin.services.SecurityService.reloadFile()
> INFO:'Reloading permissions.xml file because it has changed.'
> 15:53:20,602 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.port

Struts2 + I18N

2009-08-14 Thread Julien HENRY
Hi,

In my Struts2 application I have the following language files:

default_de.properties
default_fr.properties
default.properties (contains EN)

When I start my application, the application is in French (probably because JVM 
default locale is french). Then I tried to change language by appending 
?request_locale=XX in the URL.

Adding ?request_locale=de works fine. All texts are in German.

Adding ?request_locale=en doesn't work. All texts are in French.

I tried to add

to struts.xml but no luck.

How can I tell Struts that the default.properties file is English?

Thanks,

Julien



  

Re: Impossible to start two Struts 2 apps at the same time on Tomcat 6

2009-08-14 Thread Wes Wannemacher
Just curious, where are the struts-*.jar files? I vaguely remember a
classloader issue if you are trying to put the jars in one of Tomcat's
shared jar folders.

-Wes

On Fri, Aug 14, 2009 at 11:00 AM, HENRY Pierre wrote:
> Hi,
>
> I have 2 separate Struts 2 webapps, based both on Struts 2.1.6.
>
> Both webapps work fine when deployed separately on Tomcat 6.0.18. But when I 
> deploy both at the same time on the same Tomcat, one is working (the first 
> one alphabetically) and the seconds doesn’t start up, it gives me the 
> infamous  ‘SEVERE : error filterStart’ in the logs, and not much more 
> meaningful information as to why it’s crashing. (I set the log level to DEBUG 
> for the struts2 and xworks2 packages in log4j).
>
> If I comment out the struts 2 filter and filter mapping segments in the 
> web.xml of the second webapp, then the webapp starts without error (but of 
> course it doesn’t work), that’s why I think the problem is related to having 
> 2 Struts 2 webapps together.
>
> Thanks for any advice. I would like to at least have a stack trace…
>
> My config :
> Vista 64
> Tomcat 6.0.18
> Struts 2.1.6
> Besides that my apps also use Hibernate, Quartz, Tiles…
>
> Pierre
>
>
>
> The log of Tomcat’s startup :
>
> Listening for transport dt_socket at address: 
> 14 ao¹t 2009 15:53:14 org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not fou
> nd on the java.library.path: c:\Program Files 
> (x86)\Java\jdk1.6.0_13\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C
> :\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program 
> Files\Intel\DMIX;C:\Program Files (x86)\Com
> mon Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio 
> Shared\DLLShared;C:\Program Files (x86)\Commo
> n Files\Roxio 
> Shared\9.0\DLLShared;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program 
> Files (x86)\WinSCP\;C:\Program
> Files\SlikSvn\bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files 
> (x86)\CVSNT\
> 14 ao¹t 2009 15:53:14 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 14 ao¹t 2009 15:53:14 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 319 ms
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardService start
> INFO: D´┐¢marrage du service Catalina
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
> 15:53:15,755 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,760 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,793 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,796 - [thread:main] 
> org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
> WARN:'Cannot find TilesRequestContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Initializing filter...'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Obtaining SessionFactory from static HibernateUtil singleton'
> 15:53:19,482 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateUtil.()
> DEBUG:'Hibernate session factory created.'
> 15:53:19,502 - [thread:main] 
> ch.unine.sitel.bipeadmin.struts.security.SecurityInterceptor.init()
> INFO:'Intializing the securityInterceptor.'
> 15:53:19,506 - [thread:main] 
> ch.unine.sitel.bipeadmin.services.SecurityService.reloadFile()
> INFO:'Reloading permissions.xml file because it has changed.'
> 15:53:20,602 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,610 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,649 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,653 - [thread:main] 
> org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
> WARN:'Cannot find Ti

Re: Impossible to start two Struts 2 apps at the same time on Tomcat 6

2009-08-14 Thread Dave Newton
It doesn't seem like the logging is configured correctly, though.

I'd set /all/ logging to debug for now; we've got multiple S2 apps running on 
Tomcat with no issues so I suspect it's something relatively simple to fix once 
it's found.

Dave



- Original Message 
> I have 2 separate Struts 2 webapps, based both on Struts 2.1.6.
> 
> Both webapps work fine when deployed separately on Tomcat 6.0.18. But when I 
> deploy both at the same time on the same Tomcat, one is working (the first 
> one 
> alphabetically) and the seconds doesn’t start up, it gives me the infamous  
> ‘SEVERE : error filterStart’ in the logs, and not much more meaningful 
> information as to why it’s crashing. (I set the log level to DEBUG for the 
> struts2 and xworks2 packages in log4j).
> 
> If I comment out the struts 2 filter and filter mapping segments in the 
> web.xml 
> of the second webapp, then the webapp starts without error (but of course it 
> doesn’t work), that’s why I think the problem is related to having 2 Struts 2 
> webapps together.
> 
> Thanks for any advice. I would like to at least have a stack trace…
> 
> My config :
> Vista 64
> Tomcat 6.0.18
> Struts 2.1.6
> Besides that my apps also use Hibernate, Quartz, Tiles…
> 
> Pierre
> 
> 
> 
> The log of Tomcat’s startup :
> 
> Listening for transport dt_socket at address: 
> 14 ao¹t 2009 15:53:14 org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not fou
> nd on the java.library.path: c:\Program Files 
> (x86)\Java\jdk1.6.0_13\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C
> :\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program 
> Files\Intel\DMIX;C:\Program Files (x86)\Com
> mon Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio 
> Shared\DLLShared;C:\Program Files (x86)\Commo
> n Files\Roxio 
> Shared\9.0\DLLShared;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program 
> Files 
> (x86)\WinSCP\;C:\Program
> Files\SlikSvn\bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files 
> (x86)\CVSNT\
> 14 ao¹t 2009 15:53:14 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 14 ao¹t 2009 15:53:14 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 319 ms
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardService start
> INFO: D´┐¢marrage du service Catalina
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
> 15:53:15,755 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,760 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,793 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,796 - [thread:main] 
> org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
> WARN:'Cannot find TilesRequestContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Initializing filter...'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Obtaining SessionFactory from static HibernateUtil singleton'
> 15:53:19,482 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateUtil.()
> DEBUG:'Hibernate session factory created.'
> 15:53:19,502 - [thread:main] 
> ch.unine.sitel.bipeadmin.struts.security.SecurityInterceptor.init()
> INFO:'Intializing the securityInterceptor.'
> 15:53:19,506 - [thread:main] 
> ch.unine.sitel.bipeadmin.services.SecurityService.reloadFile()
> INFO:'Reloading permissions.xml file because it has changed.'
> 15:53:20,602 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,610 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,649 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,653 - [thread:main] 
> org.apache.tiles.contex

Problem trying to access page.

2009-08-14 Thread Bruno
Hey guys.

We have changed WAS to WAS 64 bits version and we couldn't access any page.

Follow the log exc for each time we tried to access it:

Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.
InvocationTargetException
at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:295)
at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:431)
at
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:492)
... 51 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
at
com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:462)
at
com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:477)
at
com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:34)
at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:293)
... 53 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)
at
com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)
at
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)
at
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)
at
com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
at
com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
... 58 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:440)
at
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:492)
... 63 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:419)
... 64 more
Caused by: java.lang.ClassCastException:
org.springframework.beans.factory.BeanCreationException incompatible with
org.springframework.context.ApplicationContext
at
org.apache.struts2.spring.StrutsSpringObjectFactory.(StrutsSpringObjectFactory.java:76)
... 69 more



-- 
Bruno Morelli Vargas
Mail: brun...@gmail.com
Msn: brun...@hotmail.com
Icq: 165055101
Skype: morellibmv


Impossible to start two Struts 2 apps at the same time on Tomcat 6

2009-08-14 Thread HENRY Pierre
Hi,

I have 2 separate Struts 2 webapps, based both on Struts 2.1.6.

Both webapps work fine when deployed separately on Tomcat 6.0.18. But when I 
deploy both at the same time on the same Tomcat, one is working (the first one 
alphabetically) and the seconds doesn’t start up, it gives me the infamous  
‘SEVERE : error filterStart’ in the logs, and not much more meaningful 
information as to why it’s crashing. (I set the log level to DEBUG for the 
struts2 and xworks2 packages in log4j).

If I comment out the struts 2 filter and filter mapping segments in the web.xml 
of the second webapp, then the webapp starts without error (but of course it 
doesn’t work), that’s why I think the problem is related to having 2 Struts 2 
webapps together.

Thanks for any advice. I would like to at least have a stack trace…

My config :
Vista 64
Tomcat 6.0.18
Struts 2.1.6
Besides that my apps also use Hibernate, Quartz, Tiles…

Pierre



The log of Tomcat’s startup :

Listening for transport dt_socket at address: 
14 ao¹t 2009 15:53:14 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not fou
nd on the java.library.path: c:\Program Files 
(x86)\Java\jdk1.6.0_13\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C
:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program 
Files\Intel\DMIX;C:\Program Files (x86)\Com
mon Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio 
Shared\DLLShared;C:\Program Files (x86)\Commo
n Files\Roxio 
Shared\9.0\DLLShared;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program 
Files (x86)\WinSCP\;C:\Program
Files\SlikSvn\bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files 
(x86)\CVSNT\
14 ao¹t 2009 15:53:14 org.apache.coyote.http11.Http11Protocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
14 ao¹t 2009 15:53:14 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 319 ms
14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardService start
INFO: D´┐¢marrage du service Catalina
14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
15:53:15,755 - [thread:main] 
org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
WARN:'Cannot find TilesContextFactory class 
org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
15:53:15,760 - [thread:main] 
org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
WARN:'Cannot find TilesContextFactory class 
org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
15:53:15,793 - [thread:main] 
org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
WARN:'Cannot find TilesContextFactory class 
org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
15:53:15,796 - [thread:main] 
org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
WARN:'Cannot find TilesRequestContextFactory class 
org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
15:53:16,569 - [thread:main] 
ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
INFO:'Initializing filter...'
15:53:16,569 - [thread:main] 
ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
INFO:'Obtaining SessionFactory from static HibernateUtil singleton'
15:53:19,482 - [thread:main] 
ch.unine.sitel.bipeadmin.hibernate.HibernateUtil.()
DEBUG:'Hibernate session factory created.'
15:53:19,502 - [thread:main] 
ch.unine.sitel.bipeadmin.struts.security.SecurityInterceptor.init()
INFO:'Intializing the securityInterceptor.'
15:53:19,506 - [thread:main] 
ch.unine.sitel.bipeadmin.services.SecurityService.reloadFile()
INFO:'Reloading permissions.xml file because it has changed.'
15:53:20,602 - [thread:main] 
org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
WARN:'Cannot find TilesContextFactory class 
org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
15:53:20,610 - [thread:main] 
org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
WARN:'Cannot find TilesContextFactory class 
org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
15:53:20,649 - [thread:main] 
org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
WARN:'Cannot find TilesContextFactory class 
org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
15:53:20,653 - [thread:main] 
org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
WARN:'Cannot find TilesRequestContextFactory class 
org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
15:53:20,727 - [thread:main] 
ch.unine.sitel.bipemailing.jobs.QuartzStartContextListener.contextInitialized()
INFO:'QuartzStartContextListener is starting Quartz jobs...'
14 ao¹t 2009 15:53:20 ch.unine.sitel.bipemailing.jobs.QuartzUtils getQuartz
INFO: Starting the Quartz scheduler and save its instance
15:5

Re: Scope interceptor / Practical Apache Struts 2

2009-08-14 Thread spsarolkar

Hello Ian,
I am facing the same problem. 
I tried adding dependency as selkin said as follows
 

com.googlecode.struts2scopeplugin
struts2-scope-plugin
1.0.3



But printing the same error

Can you please supply me another copy of the code . 

My email address is spsarol...@gmail.com

Thanks,
Sunil


Ian Roughley wrote:
> 
> I just re-ran my local version of the code without problems, and 
> verified that the base class does have a getModel() and setModel() 
> methods.  If you contact me off-list I can supply another copy of the 
> code, that might be a resolution.  Did you have any problems running the 
> code from chapter 5?
> 
> /Ian
> 
> -- 
> Ian Roughley
> From Down & Around, Inc.
> Consulting * Training / Mentoring * Agile Process * Open Source
> web: http://www.fdar.com - email: i...@fdar.com
> 
> 
> 
> Selckin wrote:
>> Hello,
>>
>> In Chapter 6 of "Practical Apache Struts 2 Web 2.0 Projects", It explains
>> how to use the scope interceptor to create sort of wizard pages.
>> I've been trying to figure these out, but cannot get this to work.
>> Even the included example (downloadable from
>> http://www.apress.com/book/view/1590599039 ) do not work for me.
>>
>> I was hoping someone could try them and tell me if they are indeed broken
>> or if i am doing something wrong. And what that might be?
>>
>> Running the examples with no changes and when going to the second step in
>> the workflow I get the following error:
>>
>> HTTP ERROR: 500
>> Error setting expression 'model' with value
>> 'com.fdar.apress.s2.domain.ev...@2a163765'
>>
>> RequestURI=/app/event/selectLocation!input.action
>> Caused by:
>> Error setting expression 'model' with value
>> 'com.fdar.apress.s2.domain.ev...@2a163765' - [unknown location]
>>  at
>> com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:171)
>>  at
>> com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:146)
>>  at
>> org.apache.struts2.interceptor.ScopeInterceptor.before(ScopeInterceptor.java:321)
>>  at
>> org.apache.struts2.interceptor.ScopeInterceptor.intercept(ScopeInterceptor.java:424)
>>  < cut >
>> Caused by: No object in the CompoundRoot has a publicly accessible
>> property named 'model' (no setter could be found). - [unknown location]
>>  at
>> com.opensymphony.xwork2.util.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:68)
>>  at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
>>  at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
>>  at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>> < cut > 
>> Can provide full stack trace if needed
>>
>> The following is also outputted from the example.
>>
>> SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
>> caught setting 'duration' on 'class
>> com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting
>> expression 'duration' with value '[Ljava.lang.String;@602f892f'
>> 14-feb-2008 20:10:30
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
>> SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
>> caught setting 'name' on 'class
>> com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting
>> expression 'name' with value '[Ljava.lang.String;@50d79dfe'
>> 14-feb-2008 20:10:30
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
>> SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
>> caught setting 'timeZoneOffset' on 'class
>> com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting
>> expression 'timeZoneOffset' with value '[Ljava.lang.String;@52a53948'
>> 14-feb-2008 20:10:30
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
>>
>> Thanks.
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>   
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Scope-interceptor---Practical-Apache-Struts-2-tp15487610p24971259.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



How to use workflow interceptor??

2009-08-14 Thread spsarolkar

Hello everyone,
I want to write simple program using workflow interceptor where can i find
information about workflow interceptor
thanks
-- 
View this message in context: 
http://www.nabble.com/How-to-use-workflow-interceptor---tp24970880p24970880.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2-ssl-plugin problem

2009-08-14 Thread Nuwan Chandrasoma

Louis Voo wrote:

Hi,

I download this plug-in and put into my /lib, and in my struts.xml has this




  
when I start the tomcat, it throw error :


Caused by: Unable to find interceptor class referenced by ref-name secureStack 


What else I need to configure to use this plug-in?

Thanks
Louis
  

extends from package ssl-default

Thanks,

Nuwan C.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



struts2-ssl-plugin problem

2009-08-14 Thread Louis Voo
Hi,

I download this plug-in and put into my /lib, and in my struts.xml has this




  
when I start the tomcat, it throw error :

Caused by: Unable to find interceptor class referenced by ref-name secureStack 

What else I need to configure to use this plug-in?

Thanks
Louis

Re: Creating struts2 themes

2009-08-14 Thread mailtolouis2020-struts
http://www.packtpub.com/article/themes-and-templates-with-apache-struts2





From: spsarolkar 
To: user@struts.apache.org
Sent: Friday, August 14, 2009 10:38:09 AM
Subject: Creating struts2 themes


I am learning struts2 and want to create custom themes. I am not able to find
and documentation which tells how to create new themes. Can somebody tell me
the link to the documentation where theme creation is explained step by
step.
Thanks in advance..:-) 
-- 
View this message in context: 
http://www.nabble.com/Creating-struts2-themes-tp24968978p24968978.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Creating struts2 themes

2009-08-14 Thread spsarolkar

I am learning struts2 and want to create custom themes. I am not able to find
and documentation which tells how to create new themes. Can somebody tell me
the link to the documentation where theme creation is explained step by
step.
Thanks in advance..:-) 
-- 
View this message in context: 
http://www.nabble.com/Creating-struts2-themes-tp24968978p24968978.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org