struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject RE: Bug in 2.0.9 regarding validation localization?
Date Wed, 10 Oct 2007 00:09:33 GMT
Good news/bad news:

A simple sanity-check Action class directly extending
ActionSupport is working for me under 2.0.9 using
properties from either ${action-class}.properties or
package.properties, regardless of which of those files
(or both) are present.

I am not setting struts.locale in my struts.xml
(although I *do* get the following WARN which I'll
have to look at :/

WARN  org.apache.struts2.config.Settings.getLocale:143
- Settings: Could not parse struts.locale setting,
substituting default VM locale

Just to refresh, you are using the default Struts
interceptor stack?

d.

--- Dean Pullen <dean.pullen@msp-uk.com> wrote:

> God, I must of tried everything possible by now.
> 
> Has anyone got anytime to package me a working test
> case, to see if
> there's something odd with my application server?
> 
> Or does anyone have any other ideas. The exception
> is quite explicit,
> I'd file a bug, but there doesn't seem to be any
> recent activity on the
> Struts 2 JIRA.
> 
> -----Original Message-----
> From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
> Sent: 09 October 2007 21:46
> To: Struts Users Mailing List
> Subject: RE: Bug in 2.0.9 regarding validation
> localization?
> 
> Currently struts.locale=en although I previously had
> it as en_GB prior
> to trying to debug this problem.
> 
> SalesSurveyAction extends several Actions which
> ultimately extend
> ActionSupport.
> 
> struts.i18n.reload=true isn't set, but I am
> restarting the apps server
> fully each time.
> 
> -----Original Message-----
> From: Ian Roughley [mailto:ian@fdar.com] 
> Sent: 09 October 2007 21:42
> To: Struts Users Mailing List
> Subject: Re: Bug in 2.0.9 regarding validation
> localization?
> 
> what is the values of struts.locale, and does the
> SalesSurveyAction 
> extend ActionSupport or does your action implement
> the TextProvider and 
> LocaleProvider interfaces?
> 
> Also, do you have struts.i18n.reload=true, or are
> you restarting the app
> 
> server after each modification?
> 
> /Ian
> 
> Dean Pullen wrote:
> > Just to refresh, we now have:
> >
> > @RequiredStringValidator(message = "hello", key =
> "hello")
> > public String getQuestion1Option()
> > {
> > 	return question1Option;
> > }
> >
> > In class: SalesSurveyAction, in package:
> com.msp.web.csi.surveys.sales
> >
> > I have a SalesSurveyAction.properties and a
> package.properties, (exact
> > naming), in the same folder.
> >
> > They both contain: hello=Hello
> >
> >
> >
> > -----Original Message-----
> > From: Ian Roughley [mailto:ian@fdar.com] 
> > Sent: 09 October 2007 21:00
> > To: Struts Users Mailing List
> > Subject: Re: Bug in 2.0.9 regarding validation
> localization?
> >
> > Now I know that it works with package.properties. 
> Have you tried
> using 
> > a key without a period?
> >
> > /Ian
> >
> > Dean Pullen wrote:
> >   
> >> Even adding a package.properties or even a
> className.properties
> (where
> >> className is my Action class name) doesn't
> resolve the problem.
> >>
> >> This is a huge sticking point for me, I sincerely
> hope someone can
> >>     
> > help.
> >   
> >> Dean.
> >>
> >> -----Original Message-----
> >> From: Dean Pullen [mailto:dean.pullen@msp-uk.com]
> 
> >> Sent: 09 October 2007 20:05
> >> To: Struts Users Mailing List
> >> Subject: RE: Bug in 2.0.9 regarding validation
> localization?
> >>
> >> Thanks Ian.
> >>
> >> This is in struts.xml:
> >> struts.custom.i18n.resources=struts-messages
> >>
> >> If thats what you mean?
> >>
> >> I get other localized properties from it no
> problem, e.g. using
> >>     
> > <s:text
> >   
> >> name="key.here "/>
> >>
> >>
> >>
> >> -----Original Message-----
> >> From: Ian Roughley [mailto:ian@fdar.com] 
> >> Sent: 09 October 2007 19:48
> >> To: Struts Users Mailing List
> >> Subject: Re: Bug in 2.0.9 regarding validation
> localization?
> >>
> >> I can confirm that it works.  Do you have the
> >>     
> > struts-messages.properties
> >   
> >> defined as an additional properties file in
> struts.xml?  This is not
> a
> >>     
> >
> >   
> >> standard property file name that is picked up by
> default.
> >>
> >> /Ian
> >>
> >> Dean Pullen wrote:
> >>   
> >>     
> >>> Further to my message below,
> >>>
>
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey()
> >>>     
> >>>       
> >> method
> >>   
> >>     
> >>> hasn't been implemented until 2.0.8.
> >>>
> >>> Can anyone confirm that they have localized
> validation working, as
> >>> below, with 2.0.9?
> >>>
> >>> Thanks,
> >>>
> >>> Dean.
> >>>
> >>> -----Original Message-----
> >>> From: Dean Pullen
> [mailto:dean.pullen@msp-uk.com] 
> >>> Sent: 09 October 2007 19:23
> >>> To: Struts Users Mailing List
> >>> Subject: RE: Validation problem - key not found?
> >>>
> >>> I've tried adding a package.properties with the
> same key but nothing
> >>> seems to help - I still seem to get the same
> exception.
> >>>
> >>> Anyone?
> >>>
> >>> -----Original Message-----
> >>> From: Dean Pullen
> [mailto:dean.pullen@msp-uk.com] 
> >>> Sent: 09 October 2007 18:08
> >>> To: Struts Users Mailing List
> >>> Subject: Validation problem - key not found?
> >>>
> >>>  
> >>>
> >>> Hi all.
> >>>
> >>>  
> >>>
> >>> Trying to do this:
> >>>
> >>>  
> >>>
> >>> @RequiredStringValidator(message = "Hello", key
> = "Hello.key")
> 
=== message truncated ===


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


Mime
View raw message