Not sure how an application could not know the bundle to select. Imagine you have files xxx_de.props and xxx.props, you have a parent-son relationship between those 2 bundles (xxx is parent of xxx_de). If you look-up something for a de Locale, it looks first in xxx_de, then if not found it looks in xxx. If you look-up something for another Locale (e.g. en), it looks in xxx. In both cases, if no match is ever found for the key, it throws a MissingResourceException. Then depending on the "higher level framework", it can let the exception propagate, return null or return the key or whatever.
So in Adam's case, I just saw a possibility that if he has a xxx.props file and a xxx_en.props file, the resources could come from the xxx.props if the Locale was not explicitly set to en in the browser (e.g. the Locale defaulted to de because that's the Locale of the OS the server is running on). Now Adam, I'm seeing another possibility of confusion here. If you do not have a xxx.props file, only a xxx_en.props file and your Locale is not en, you would not find any resource for any key. Now I believe depending on how struts is configured, it could return the key instead throwing an exception when the key is not found. So this might sound stupid, but by any chance would it be your key (in german) that you're seeing as your ghost messages? BTW, I'm talking about Java ResourceBundle mechanism, not struts MessageResources, not sure if the mechanism is the same. > -----Original Message----- > From: chekuri raju [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 20, 2004 2:51 PM > To: Struts Users Mailing List > Subject: RE: deleted ApplicationResources_de.properties ghost > > Hi Eric > i think if ur application does not know which file to read then by default > it reads AppXXXXXX_de.props file.as _de.props comes before _en.props (in > alphabatical order after de we get en) > > thanks > srinivas > > Eric Bariaux <[EMAIL PROTECTED]> wrote: > Do you have a "default" xxx.properties file, one without _en? > This would explain why setting the browser the en gives you the correct > result and setting "nothing" or de gives you the incorrect strings. > > Eric. > > > -----Original Message----- > > From: Adam Hardy [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, January 20, 2004 2:25 PM > > To: Struts Users Mailing List > > Subject: Re: deleted ApplicationResources_de.properties ghost > > > > Deployed my war file on a server I'd never touched before. Same > problem. > > > > I re-created the German xxx_de.properties file with a copy of the > > English, and changed a couple of strings into German to hilight the > > difference. This change took effect - the 'ghost' German disappeared > and > > was replaced by the real German. > > > > However as I feared when I deleted this new German properties file, > the > > previous 'ghost' German reappeared. > > > > What logical conclusion can I draw from that? > > > > > > > > On 01/20/2004 12:07 PM Andriy Ruzhevych wrote: > > > Did you seach German string or xxx_de.properties file in all > ear/war of > > the > > > web server? > > > > > > -----Original Message----- > > > From: Adam Hardy [mailto:[EMAIL PROTECTED] > > > > > > Thanks Heya, but not wild & crazy enough :) - I already did that. In > > > fact I made a war file and tested it on a completely different > server. > > > > > > On 01/20/2004 08:28 AM [EMAIL PROTECTED] wrote: > > > > > >>This is one of those wild crazy ideas that you asked for... I know > > >>you grepped but maybe didn't grep properly? > > >> > > >>There are usually two copies of your resources files, one under your > > >>source directory and that is copied to your classes directory by > > >>Tomcat. The one in classes is actually read by the server, but the > > >>one in source is the one you edit because it should replace the > > >>classes one. Just check manually rather than grepping and see if you > > >>find the "ghost" file. > > >> > > >>Adam Hardy 20/01/2004 06:12 PM > > >>Please respond to "Struts Users Mailing List" > > >> > > >>Does anybody have any ideas on this? Even wild, stupid, ridiculous > > >>ideas. Anything? > > >> > > >>On 01/19/2004 07:02 PM Adam Hardy wrote: > > >> > > >>>Actually I just did get access to a third server and did a complete > > >>> fresh install of java & tomcat and my app.war, and the ghost > > >>>German strings came up. > > >>> > > >>>So the German strings must be in the war file. But there is only > > >>>the one ApplicationResources.properties file there in the war file! > > >>> I just > > >> > > >>checked. > > >> > > >> > > >>>Again, deleting or adding the German locale to the browser settings > > >>> makes the strings change, so it is definitely the resource > > >>>bundles. > > >>> > > >>> > > >>>On 01/19/2004 06:17 PM Adam Hardy wrote: > > >>> > > >>>>Yes, unfortunately it does. On my dev machine and my future > > >>>>production server. But I had them both running earlier with the > > >>>>German .properties, so it would be the same problem. I don't have > > >>>> a third server to test it on. > > >>>> > > >>>>On 01/19/2004 05:54 PM Tim Kettering wrote: > > >>>> > > >>>>>Does the same thing happen when you build/run the webapp on a > > >> > > >>different > > >> > > >>>>>computer? Not sure what to tell you here, but that should at > > >>>>>least narrow the scope to something in the source or some ghost > > >>>>> file on your dev machine. > > >>>>> > > >>>>>-tim > > >>>>> > > >>>>>-----Original Message----- From: Adam Hardy > > >>>>>[mailto:[EMAIL PROTECTED] Sent: Monday, January > > >>>>> 19, 2004 11:35 AM To: Struts Users Mailing List Subject: > > >>>>>deleted ApplicationResources_de.properties ghost > > >>>>> > > >>>>> > > >>>>>I'm having a nightmare with the > > >>>>>ApplicationResources_de.properties resource bundle in my > > >>>>>webapp. I asked a colleague to look at it and he's baffled too. > > >>>>> > > >>>>> > > >>>>>I had my resource bundle in an English and also a German > > >>>>>.properties file, for testing purposes, but then decided to > > >>>>>ditch the German version until it's completely finished. > > >>>>> > > >>>>>Even though I deleted the German xxx_de.properties file, > > >>>>>shutdown tomcat, deleted the whole webapp and redeployed and > > >>>>>deleted the cache in $CATALINA_HOME/work/.... , the German > > >>>>>strings are still being cached somewhere. > > >>>>> > > >>>>>I have run a grep on a German string to find it in any file in > > >>>>>the whole of the tomcat, and the whole of my dev-env, but > > >>>>>haven't found it. > > >>>>> > > >>>>>In the HTTP headers, I have set pragma=no-cache, > > >>>>>cache-control=no-cache & expires=Thu, 01 Jan 1970 00:00:00 GMT > > >>>>> > > >>>>>I have cleared the cache from my browser and done refreshes a > > >>>>>thousand times. This is now about a month afterwards and the > > >>>>>ghost German text is still coming up. > > >>>>> > > >>>>>If I set the browser locale to en, then I get the correct > > >>>>>English version, but if I then set it back to de, somehow, > > >>>>>somewhere it is finding the deleted German resource bundle. > > >>>>> > > >>>>>Any advice much appreciated. :( > > > > > > -- > > struts 1.1 + tomcat 5.0.16 + java 1.4.2 > > Linux 2.4.20 Debian > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------- > Do you Yahoo!? > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

