wood burning stoves 2.0*
The moose likes Struts and the fly likes urgent pls help.. problem loadning application_resources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "urgent pls help.. problem loadning application_resources" Watch "urgent pls help.. problem loadning application_resources" New topic
Author

urgent pls help.. problem loadning application_resources

Jiji Cherian
Greenhorn

Joined: Apr 15, 2005
Posts: 14
Hi there,
we are facing a serious problem.. but dont know what is the reason.
our application runs on jboss 4.0.2..
we are using struts..
we have configured application_resources to support two languages..
the struts locale_key is also set as follows.
for german
session.setAttribute(org.apache.struts.Globals.LOCALE_KEY,new java.util.Locale("de","DE"));
for english
session.setAttribute(org.apache.struts.Globals.LOCALE_KEY,new java.util.Locale("en","US"));

but sometimes even if english is set for somr pages german words are taken from application resources..
this is happening after we have configured virtual hosts for the server..
now we have two domain names for the same application..
and the conflict is showing for only one domain..
please help us to solve the problem
thanks in advance


Rgds.<br /> <a href="mailto:mr.jiji@gmail.com" rel="nofollow">mr.jiji@gmail.com</a>
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi
can you let me know the name of the resource bundle you have used for english resources . Ensure that u append _en to the english recource bundle else it will pick up the server locale bundle ..ie. german bundle
Jiji Cherian
Greenhorn

Joined: Apr 15, 2005
Posts: 14
Hi sreenath,
Thanks for ur response..
the file names are ApplicationResources_de.properties and ApplicationResources.properties..
Its not working only for a few pages and not always..
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi

Make that ApplicationResources.properties as ApplicationeResources_en.properties ........else the earlier resource bundle will not be taken in English Locale and it will always pick ur server locale bundle

and one more thing u r saying that its coming in only few pages , that might be the problem with browser cache also . then see such that u place cache removal code on the top of all ur jsps so that browser will stop caching
Jiji Cherian
Greenhorn

Joined: Apr 15, 2005
Posts: 14
Once again thanks Sreenath for responding..
Cold u tell me more about cache removal codes..
If possible please give me an example..
Thanks in advance..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: urgent pls help.. problem loadning application_resources