I need to read in a .txt file into a groovy class in order to interrogate it line by line. But I am not sure what folder I put it into in my grails app, and how to get the
You can put your file under web-app/
Example:
web-app/lexicon.txt
And then in your controller or service use grailsApplication:
class MyService { def grailsApplication public myMethod() { File myFile = grailsApplication.mainContext.getResource("lexicon.txt").file } }
Hope this helps