Meaningless Drivel is fun!*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Message Resource FIle - Get Value