This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes Message Resource FIle - Get Value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Message Resource FIle - Get Value" Watch "Message Resource FIle - Get Value" New topic
Author

Message Resource FIle - Get Value

ankit maini
Greenhorn

Joined: Feb 08, 2011
Posts: 25

I am using struts 1.1.
In my project i have one message-resources file called ApplicationResource.properties . Now i want to get the value of a key say my database password and username from this properties file in normal java class in my project. How can i do this. Please explain.

Thanks in Advance
ankit maini
Greenhorn

Joined: Feb 08, 2011
Posts: 25

Please reply as soon as possible.
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 132

Hi,

Hope you would have got the solution by now.

here is a code snippet which can be used for reading properties file in a web application.

ankit maini
Greenhorn

Joined: Feb 08, 2011
Posts: 25

@rohit chavan

Thanks
 
GeeCON Prague 2014
 
subject: Message Resource FIle - Get Value