You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dean Pullen <de...@msp-uk.com> on 2007/10/09 19:08:02 UTC

Validation problem - key not found?

 

Hi all.

 

Trying to do this:

 

@RequiredStringValidator(message = "Hello", key = "Hello.key")

public String getQuestion1Option()

{

return question1Option;

}

 

 

But receiving this error on submission of the action:

 

[09 Oct 2007 17:54:46] ERROR
org.apache.catalina.core.ContainerBase.[jboss.web].

[localhost].[/csi].[default]  - Servlet.service() for servlet default
threw exce

ption

java.lang.NullPointerException

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali

zedTextUtil.java:240)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc

alizedTextUtil.java:219)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe

xtUtil.java:602)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT

extUtil.java:643)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:360)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:293)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:173)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:104)

        at
com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)

        at
com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(

DelegatingValidatorContext.java:106)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess

age(ValidatorSupport.java:66)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel

dError(ValidatorSupport.java:162)

        at
com.opensymphony.xwork2.validator.validators.RequiredStringValidator.

validate(RequiredStringValidator.java:77)

 

etc

 

 

Any idea what's wrong? The key is in my struts-messages.properties and
struts-messages_en.properties

 

Cheers


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dave Newton <ne...@yahoo.com>.
--- Dean Pullen <de...@msp-uk.com> wrote:
> Maybe I simply shouldn't of over-ridden getLocale
> from ActionSupport...

:D

Probably not. I did much the same thing with another
ActionSupport-implemented method once; didn't catch it
for 3+ weeks :/

Glad you found it!

d.


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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
Maybe I simply shouldn't of over-ridden getLocale from ActionSupport...


-----Original Message-----
From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
Sent: 10 October 2007 11:51
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

Well well well....

I've found the problem. And it's an odd one.

The Action class was extending another class, which had in it the
following:


private Locale locale;

public Locale getLocale()
{
		return locale;
}

	public void setLocale(Locale locale)
{
		this.locale = locale;
}


Renaming this variable (and the associated getter/setter) solves the
problem in its entirety.

I've not read this was not allowed anywhere....so it's very peculiar.
Should I raise a bug?


Thanks to everyone who gave me advice and attempted to resolve the
issue.


-----Original Message-----
From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
Sent: 10 October 2007 09:06
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

I've just done a very simple test too and it appears to be working.
I'll endeavour to find out what's wrong and report back.

-----Original Message-----
From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
Sent: 10 October 2007 08:53
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

Dave,

Thanks for your efforts.
Is it worth me using your setup to test here?

And yes I'm using the default interceptor stack.

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: 10 October 2007 01:10
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

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 <de...@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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
Well well well....

I've found the problem. And it's an odd one.

The Action class was extending another class, which had in it the
following:


private Locale locale;

public Locale getLocale()
{
		return locale;
}

	public void setLocale(Locale locale)
{
		this.locale = locale;
}


Renaming this variable (and the associated getter/setter) solves the
problem in its entirety.

I've not read this was not allowed anywhere....so it's very peculiar.
Should I raise a bug?


Thanks to everyone who gave me advice and attempted to resolve the
issue.


-----Original Message-----
From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
Sent: 10 October 2007 09:06
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

I've just done a very simple test too and it appears to be working.
I'll endeavour to find out what's wrong and report back.

-----Original Message-----
From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
Sent: 10 October 2007 08:53
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

Dave,

Thanks for your efforts.
Is it worth me using your setup to test here?

And yes I'm using the default interceptor stack.

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: 10 October 2007 01:10
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

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 <de...@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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
I've just done a very simple test too and it appears to be working.
I'll endeavour to find out what's wrong and report back.

-----Original Message-----
From: Dean Pullen [mailto:dean.pullen@msp-uk.com] 
Sent: 10 October 2007 08:53
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

Dave,

Thanks for your efforts.
Is it worth me using your setup to test here?

And yes I'm using the default interceptor stack.

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: 10 October 2007 01:10
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

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 <de...@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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
Dave,

Thanks for your efforts.
Is it worth me using your setup to test here?

And yes I'm using the default interceptor stack.

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: 10 October 2007 01:10
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

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 <de...@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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dave Newton <ne...@yahoo.com>.
--- Dave Newton <ne...@yahoo.com> wrote:
> 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

Sorry; this is
https://issues.apache.org/struts/browse/WW-2068.

d.


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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dave Newton <ne...@yahoo.com>.
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 <de...@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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dave Newton <ne...@yahoo.com>.
--- Dean Pullen <de...@msp-uk.com> wrote:
> 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.

There is JIRA activity almost daily.

I'll run a simple sanity-check test case and report
back.

d.



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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
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")
>>>
>>> public String getQuestion1Option()
>>>
>>> {
>>>
>>> return question1Option;
>>>
>>> }
>>>
>>>  
>>>
>>>  
>>>
>>> But receiving this error on submission of the action:
>>>
>>>  
>>>
>>> [09 Oct 2007 17:54:46] ERROR
>>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>>
>>> [localhost].[/csi].[default]  - Servlet.service() for servlet
default
>>> threw exce
>>>
>>> ption
>>>
>>> java.lang.NullPointerException
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>>
>>> zedTextUtil.java:240)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>>
>>> alizedTextUtil.java:219)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>>
>>> xtUtil.java:602)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>>
>>> extUtil.java:643)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>>
>>> Util.java:360)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>>
>>> Util.java:293)
>>>
>>>         at
>>>
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>>
>>> rt.java:173)
>>>
>>>         at
>>>
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>>
>>> rt.java:104)
>>>
>>>         at
>>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>>
>>> DelegatingValidatorContext.java:106)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>>
>>> age(ValidatorSupport.java:66)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>>
>>> dError(ValidatorSupport.java:162)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>>
>>> validate(RequiredStringValidator.java:77)
>>>
>>>  
>>>
>>> etc
>>>
>>>  
>>>
>>>  
>>>
>>> Any idea what's wrong? The key is in my struts-messages.properties
>>>       
> and
>   
>>> struts-messages_en.properties
>>>
>>>  
>>>
>>> Cheers
>>>
>>>
>>>
>>> Scanned by MailDefender - managed email security from intY -
>>> www.maildefender.net
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>> Scanned by MailDefender - managed email security from intY -
>>> www.maildefender.net
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>   
>>>     
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>   
>>     
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
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")
>>>
>>> public String getQuestion1Option()
>>>
>>> {
>>>
>>> return question1Option;
>>>
>>> }
>>>
>>>  
>>>
>>>  
>>>
>>> But receiving this error on submission of the action:
>>>
>>>  
>>>
>>> [09 Oct 2007 17:54:46] ERROR
>>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>>
>>> [localhost].[/csi].[default]  - Servlet.service() for servlet
default
>>> threw exce
>>>
>>> ption
>>>
>>> java.lang.NullPointerException
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>>
>>> zedTextUtil.java:240)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>>
>>> alizedTextUtil.java:219)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>>
>>> xtUtil.java:602)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>>
>>> extUtil.java:643)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>>
>>> Util.java:360)
>>>
>>>         at
>>>
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>>
>>> Util.java:293)
>>>
>>>         at
>>>
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>>
>>> rt.java:173)
>>>
>>>         at
>>>
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>>
>>> rt.java:104)
>>>
>>>         at
>>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>>
>>> DelegatingValidatorContext.java:106)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>>
>>> age(ValidatorSupport.java:66)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>>
>>> dError(ValidatorSupport.java:162)
>>>
>>>         at
>>>
com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>>
>>> validate(RequiredStringValidator.java:77)
>>>
>>>  
>>>
>>> etc
>>>
>>>  
>>>
>>>  
>>>
>>> Any idea what's wrong? The key is in my struts-messages.properties
>>>       
> and
>   
>>> struts-messages_en.properties
>>>
>>>  
>>>
>>> Cheers
>>>
>>>
>>>
>>> Scanned by MailDefender - managed email security from intY -
>>> www.maildefender.net
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>> Scanned by MailDefender - managed email security from intY -
>>> www.maildefender.net
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>   
>>>     
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>   
>>     
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Re: Bug in 2.0.9 regarding validation localization?

Posted by Ian Roughley <ia...@fdar.com>.
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")
>>>
>>> public String getQuestion1Option()
>>>
>>> {
>>>
>>> return question1Option;
>>>
>>> }
>>>
>>>  
>>>
>>>  
>>>
>>> But receiving this error on submission of the action:
>>>
>>>  
>>>
>>> [09 Oct 2007 17:54:46] ERROR
>>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>>
>>> [localhost].[/csi].[default]  - Servlet.service() for servlet default
>>> threw exce
>>>
>>> ption
>>>
>>> java.lang.NullPointerException
>>>
>>>         at
>>> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>>
>>> zedTextUtil.java:240)
>>>
>>>         at
>>> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>>
>>> alizedTextUtil.java:219)
>>>
>>>         at
>>> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>>
>>> xtUtil.java:602)
>>>
>>>         at
>>> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>>
>>> extUtil.java:643)
>>>
>>>         at
>>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>>
>>> Util.java:360)
>>>
>>>         at
>>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>>
>>> Util.java:293)
>>>
>>>         at
>>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>>
>>> rt.java:173)
>>>
>>>         at
>>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>>
>>> rt.java:104)
>>>
>>>         at
>>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>>
>>>         at
>>> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>>
>>> DelegatingValidatorContext.java:106)
>>>
>>>         at
>>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>>
>>> age(ValidatorSupport.java:66)
>>>
>>>         at
>>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>>
>>> dError(ValidatorSupport.java:162)
>>>
>>>         at
>>> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>>
>>> validate(RequiredStringValidator.java:77)
>>>
>>>  
>>>
>>> etc
>>>
>>>  
>>>
>>>  
>>>
>>> Any idea what's wrong? The key is in my struts-messages.properties
>>>       
> and
>   
>>> struts-messages_en.properties
>>>
>>>  
>>>
>>> Cheers
>>>
>>>
>>>
>>> Scanned by MailDefender - managed email security from intY -
>>> www.maildefender.net
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>> Scanned by MailDefender - managed email security from intY -
>>> www.maildefender.net
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>   
>>>     
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>   
>>     
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
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")
>>
>> public String getQuestion1Option()
>>
>> {
>>
>> return question1Option;
>>
>> }
>>
>>  
>>
>>  
>>
>> But receiving this error on submission of the action:
>>
>>  
>>
>> [09 Oct 2007 17:54:46] ERROR
>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>
>> [localhost].[/csi].[default]  - Servlet.service() for servlet default
>> threw exce
>>
>> ption
>>
>> java.lang.NullPointerException
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>
>> zedTextUtil.java:240)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>
>> alizedTextUtil.java:219)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>
>> xtUtil.java:602)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>
>> extUtil.java:643)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:360)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:293)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:173)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:104)
>>
>>         at
>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>
>>         at
>> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>
>> DelegatingValidatorContext.java:106)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>
>> age(ValidatorSupport.java:66)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>
>> dError(ValidatorSupport.java:162)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>
>> validate(RequiredStringValidator.java:77)
>>
>>  
>>
>> etc
>>
>>  
>>
>>  
>>
>> Any idea what's wrong? The key is in my struts-messages.properties
and
>> struts-messages_en.properties
>>
>>  
>>
>> Cheers
>>
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
I appreciate you trying to get to the root of it, but no, there's no
typo.

-----Original Message-----
From: Christopher Loschen [mailto:CLoschen@axeda.com] 
Sent: 09 October 2007 21:05
To: Struts Users Mailing List
Subject: RE: Bug in 2.0.9 regarding validation localization?

I'm sure you've already checked, but a double-check might be helpful:
what is the actual entry in package.properties? For example, do you have
a typo in your key there? Did you name that hello.key instead of
Hello.key?

You know, the usual things that are obvious once you actually see
them...

Chris

-----Original Message-----
From: Ian Roughley [mailto:ian@fdar.com] 
Sent: Tuesday, October 09, 2007 4:00 PM
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")
>>
>> public String getQuestion1Option()
>>
>> {
>>
>> return question1Option;
>>
>> }
>>
>>  
>>
>>  
>>
>> But receiving this error on submission of the action:
>>
>>  
>>
>> [09 Oct 2007 17:54:46] ERROR
>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>
>> [localhost].[/csi].[default]  - Servlet.service() for servlet default
>> threw exce
>>
>> ption
>>
>> java.lang.NullPointerException
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>
>> zedTextUtil.java:240)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>
>> alizedTextUtil.java:219)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>
>> xtUtil.java:602)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>
>> extUtil.java:643)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:360)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:293)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:173)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:104)
>>
>>         at
>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>
>>         at
>> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>
>> DelegatingValidatorContext.java:106)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>
>> age(ValidatorSupport.java:66)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>
>> dError(ValidatorSupport.java:162)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>
>> validate(RequiredStringValidator.java:77)
>>
>>  
>>
>> etc
>>
>>  
>>
>>  
>>
>> Any idea what's wrong? The key is in my struts-messages.properties
and
>> struts-messages_en.properties
>>
>>  
>>
>> Cheers


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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Christopher Loschen <CL...@axeda.com>.
I'm sure you've already checked, but a double-check might be helpful:
what is the actual entry in package.properties? For example, do you have
a typo in your key there? Did you name that hello.key instead of
Hello.key?

You know, the usual things that are obvious once you actually see
them...

Chris

-----Original Message-----
From: Ian Roughley [mailto:ian@fdar.com] 
Sent: Tuesday, October 09, 2007 4:00 PM
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")
>>
>> public String getQuestion1Option()
>>
>> {
>>
>> return question1Option;
>>
>> }
>>
>>  
>>
>>  
>>
>> But receiving this error on submission of the action:
>>
>>  
>>
>> [09 Oct 2007 17:54:46] ERROR
>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>
>> [localhost].[/csi].[default]  - Servlet.service() for servlet default
>> threw exce
>>
>> ption
>>
>> java.lang.NullPointerException
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>
>> zedTextUtil.java:240)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>
>> alizedTextUtil.java:219)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>
>> xtUtil.java:602)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>
>> extUtil.java:643)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:360)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:293)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:173)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:104)
>>
>>         at
>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>
>>         at
>> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>
>> DelegatingValidatorContext.java:106)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>
>> age(ValidatorSupport.java:66)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>
>> dError(ValidatorSupport.java:162)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>
>> validate(RequiredStringValidator.java:77)
>>
>>  
>>
>> etc
>>
>>  
>>
>>  
>>
>> Any idea what's wrong? The key is in my struts-messages.properties
and
>> struts-messages_en.properties
>>
>>  
>>
>> Cheers


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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
Makes no difference Ian :-/

-----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")
>>
>> public String getQuestion1Option()
>>
>> {
>>
>> return question1Option;
>>
>> }
>>
>>  
>>
>>  
>>
>> But receiving this error on submission of the action:
>>
>>  
>>
>> [09 Oct 2007 17:54:46] ERROR
>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>
>> [localhost].[/csi].[default]  - Servlet.service() for servlet default
>> threw exce
>>
>> ption
>>
>> java.lang.NullPointerException
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>
>> zedTextUtil.java:240)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>
>> alizedTextUtil.java:219)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>
>> xtUtil.java:602)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>
>> extUtil.java:643)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:360)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:293)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:173)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:104)
>>
>>         at
>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>
>>         at
>> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>
>> DelegatingValidatorContext.java:106)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>
>> age(ValidatorSupport.java:66)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>
>> dError(ValidatorSupport.java:162)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>
>> validate(RequiredStringValidator.java:77)
>>
>>  
>>
>> etc
>>
>>  
>>
>>  
>>
>> Any idea what's wrong? The key is in my struts-messages.properties
and
>> struts-messages_en.properties
>>
>>  
>>
>> Cheers
>>
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Re: Bug in 2.0.9 regarding validation localization?

Posted by Ian Roughley <ia...@fdar.com>.
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")
>>
>> public String getQuestion1Option()
>>
>> {
>>
>> return question1Option;
>>
>> }
>>
>>  
>>
>>  
>>
>> But receiving this error on submission of the action:
>>
>>  
>>
>> [09 Oct 2007 17:54:46] ERROR
>> org.apache.catalina.core.ContainerBase.[jboss.web].
>>
>> [localhost].[/csi].[default]  - Servlet.service() for servlet default
>> threw exce
>>
>> ption
>>
>> java.lang.NullPointerException
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>>
>> zedTextUtil.java:240)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>>
>> alizedTextUtil.java:219)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>>
>> xtUtil.java:602)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>>
>> extUtil.java:643)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:360)
>>
>>         at
>> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>>
>> Util.java:293)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:173)
>>
>>         at
>> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>>
>> rt.java:104)
>>
>>         at
>> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>>
>>         at
>> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>>
>> DelegatingValidatorContext.java:106)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>>
>> age(ValidatorSupport.java:66)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>>
>> dError(ValidatorSupport.java:162)
>>
>>         at
>> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>>
>> validate(RequiredStringValidator.java:77)
>>
>>  
>>
>> etc
>>
>>  
>>
>>  
>>
>> Any idea what's wrong? The key is in my struts-messages.properties and
>> struts-messages_en.properties
>>
>>  
>>
>> Cheers
>>
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> Scanned by MailDefender - managed email security from intY -
>> www.maildefender.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
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")
>
> public String getQuestion1Option()
>
> {
>
> return question1Option;
>
> }
>
>  
>
>  
>
> But receiving this error on submission of the action:
>
>  
>
> [09 Oct 2007 17:54:46] ERROR
> org.apache.catalina.core.ContainerBase.[jboss.web].
>
> [localhost].[/csi].[default]  - Servlet.service() for servlet default
> threw exce
>
> ption
>
> java.lang.NullPointerException
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>
> zedTextUtil.java:240)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>
> alizedTextUtil.java:219)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>
> xtUtil.java:602)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>
> extUtil.java:643)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>
> Util.java:360)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>
> Util.java:293)
>
>         at
> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>
> rt.java:173)
>
>         at
> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>
> rt.java:104)
>
>         at
> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>
>         at
> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>
> DelegatingValidatorContext.java:106)
>
>         at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>
> age(ValidatorSupport.java:66)
>
>         at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>
> dError(ValidatorSupport.java:162)
>
>         at
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>
> validate(RequiredStringValidator.java:77)
>
>  
>
> etc
>
>  
>
>  
>
> Any idea what's wrong? The key is in my struts-messages.properties and
> struts-messages_en.properties
>
>  
>
> Cheers
>
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
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")
>
> public String getQuestion1Option()
>
> {
>
> return question1Option;
>
> }
>
>  
>
>  
>
> But receiving this error on submission of the action:
>
>  
>
> [09 Oct 2007 17:54:46] ERROR
> org.apache.catalina.core.ContainerBase.[jboss.web].
>
> [localhost].[/csi].[default]  - Servlet.service() for servlet default
> threw exce
>
> ption
>
> java.lang.NullPointerException
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>
> zedTextUtil.java:240)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>
> alizedTextUtil.java:219)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>
> xtUtil.java:602)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>
> extUtil.java:643)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>
> Util.java:360)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>
> Util.java:293)
>
>         at
> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>
> rt.java:173)
>
>         at
> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>
> rt.java:104)
>
>         at
> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>
>         at
> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>
> DelegatingValidatorContext.java:106)
>
>         at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>
> age(ValidatorSupport.java:66)
>
>         at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>
> dError(ValidatorSupport.java:162)
>
>         at
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>
> validate(RequiredStringValidator.java:77)
>
>  
>
> etc
>
>  
>
>  
>
> Any idea what's wrong? The key is in my struts-messages.properties and
> struts-messages_en.properties
>
>  
>
> Cheers
>
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Re: Bug in 2.0.9 regarding validation localization?

Posted by Ian Roughley <ia...@fdar.com>.
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")
>
> public String getQuestion1Option()
>
> {
>
> return question1Option;
>
> }
>
>  
>
>  
>
> But receiving this error on submission of the action:
>
>  
>
> [09 Oct 2007 17:54:46] ERROR
> org.apache.catalina.core.ContainerBase.[jboss.web].
>
> [localhost].[/csi].[default]  - Servlet.service() for servlet default
> threw exce
>
> ption
>
> java.lang.NullPointerException
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali
>
> zedTextUtil.java:240)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc
>
> alizedTextUtil.java:219)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe
>
> xtUtil.java:602)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT
>
> extUtil.java:643)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>
> Util.java:360)
>
>         at
> com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText
>
> Util.java:293)
>
>         at
> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>
> rt.java:173)
>
>         at
> com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo
>
> rt.java:104)
>
>         at
> com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)
>
>         at
> com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(
>
> DelegatingValidatorContext.java:106)
>
>         at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess
>
> age(ValidatorSupport.java:66)
>
>         at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel
>
> dError(ValidatorSupport.java:162)
>
>         at
> com.opensymphony.xwork2.validator.validators.RequiredStringValidator.
>
> validate(RequiredStringValidator.java:77)
>
>  
>
> etc
>
>  
>
>  
>
> Any idea what's wrong? The key is in my struts-messages.properties and
> struts-messages_en.properties
>
>  
>
> Cheers
>
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Scanned by MailDefender - managed email security from intY -
> www.maildefender.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

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


Bug in 2.0.9 regarding validation localization?

Posted by Dean Pullen <de...@msp-uk.com>.
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")

public String getQuestion1Option()

{

return question1Option;

}

 

 

But receiving this error on submission of the action:

 

[09 Oct 2007 17:54:46] ERROR
org.apache.catalina.core.ContainerBase.[jboss.web].

[localhost].[/csi].[default]  - Servlet.service() for servlet default
threw exce

ption

java.lang.NullPointerException

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali

zedTextUtil.java:240)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc

alizedTextUtil.java:219)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe

xtUtil.java:602)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT

extUtil.java:643)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:360)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:293)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:173)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:104)

        at
com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)

        at
com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(

DelegatingValidatorContext.java:106)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess

age(ValidatorSupport.java:66)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel

dError(ValidatorSupport.java:162)

        at
com.opensymphony.xwork2.validator.validators.RequiredStringValidator.

validate(RequiredStringValidator.java:77)

 

etc

 

 

Any idea what's wrong? The key is in my struts-messages.properties and
struts-messages_en.properties

 

Cheers



Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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


RE: Validation problem - key not found?

Posted by Dean Pullen <de...@msp-uk.com>.
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")

public String getQuestion1Option()

{

return question1Option;

}

 

 

But receiving this error on submission of the action:

 

[09 Oct 2007 17:54:46] ERROR
org.apache.catalina.core.ContainerBase.[jboss.web].

[localhost].[/csi].[default]  - Servlet.service() for servlet default
threw exce

ption

java.lang.NullPointerException

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali

zedTextUtil.java:240)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc

alizedTextUtil.java:219)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe

xtUtil.java:602)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT

extUtil.java:643)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:360)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:293)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:173)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:104)

        at
com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)

        at
com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(

DelegatingValidatorContext.java:106)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess

age(ValidatorSupport.java:66)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel

dError(ValidatorSupport.java:162)

        at
com.opensymphony.xwork2.validator.validators.RequiredStringValidator.

validate(RequiredStringValidator.java:77)

 

etc

 

 

Any idea what's wrong? The key is in my struts-messages.properties and
struts-messages_en.properties

 

Cheers



Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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