File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes get value from propertie file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "get value from propertie file?" Watch "get value from propertie file?" New topic

get value from propertie file?

Weston Kornfeld

Joined: Mar 01, 2005
Posts: 28

How do I get a value out of a property file (name=value) from inside a jsp. I am using struts as well?

Many Thanks
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
There is no inbuilt thing as such in struts for doing that .but you always have an option of placing the same key and value in the and then read it using the bean:message tag .but it all depends on where you need to place that resource
sudin prans

Joined: Sep 02, 2005
Posts: 4
For example in a web application ,I can have the property file in which I can have the pair,page.title=Home,which I can retrieve in my .jsp as <bean:message key="page.title"/>.
But for this,I should have the entry <message-resources parameter="ApplicationResources" /> in my struts-config.xml.

Hope this would help.Pls try.
It is sorta covered in the JavaRanch Style Guide.
subject: get value from propertie file?
It's not a secret anymore!