aspose file tools*
The moose likes Struts and the fly likes struts1.X Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts1.X" Watch "struts1.X" New topic
Author

struts1.X

annapoorna ch
Greenhorn

Joined: Jan 20, 2010
Posts: 4
Hi !!!

As it is possible to add default resource bundle using LocalizedTextUtil.addDefaultResourceBundle() in struts2. I want to achieve the same thing in struts1.X .. i want to set a particular ResourceBundle as default depending upon some conditions.


is it possible to do like that ? can any one suggest the solution ...


Thanks in Advance

Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

Not that I know of. But in Struts 1 you can have multiple resource bundles so it is possible to do something similar. As for a solution, it depends on what, exactly, you are trying to accomplish
annapoorna ch
Greenhorn

Joined: Jan 20, 2010
Posts: 4
Hi Richard!

Thanks for your reply.. What i need exactly is ,

I have two users user1,user2. And i have 2 properties files user1.properties,user2.properties with same keys and diffrent messages.. If user1 logins i should display messages from user1.properties bundle and if user2 logins do the same from User2.properties bundle.

Any solution ?
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

Maybe you could adapt something like this example.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts1.X