This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Groovy and the fly likes how to read .properties file in grails ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "how to read .properties file in grails ?" Watch "how to read .properties file in grails ?" New topic
Author

how to read .properties file in grails ?

Nazeer Ahammad
Ranch Hand

Joined: Feb 26, 2012
Posts: 43
hi all,

How to read .properties file which is in WEB-APP folder in grails ?

please help me....



Regards,
Nazeer
Pavel Sok
Greenhorn

Joined: Nov 23, 2013
Posts: 10
This is simple:
Let's assume you have a certain property file with one property: my.property="property"
You should specify your property file in Config.groovy

After that using DI you'll get in your grails application:

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to read .properties file in grails ?
 
Similar Threads
Problem with multiple grails app on glassfish.
Read duplicate keys from properties file
Reading properties from another properties file.
Grails 1.0 Web Application Development - TOC
Passing parameters to Quartz job