How to find the physical path of a GSP file in a deployed grails application

Posted by Deepak Mittal on Stack Overflow See other posts from Stack Overflow or by Deepak Mittal
Published on 2009-01-29T09:57:45Z Indexed on 2010/04/25 2:13 UTC
Read the original article Hit count: 445

Filed under:

I need to find out the physical path of a grails GSP file.

My requirement is that I want to create a new layout file at run-time and use that in the application.

I have been able to achieve this without problem when the application runs on jetty (grails run-app), however, when I deploy the app on Jboss, the path at which the file needs to be created changes.

So, ideally I would like to find out at runtime using some magical utility the path of a particular GSP (lets say main.gsp layout file) and I need to create my new layout in the same directory in which main.gsp reside.

Any pointers?

-Deepak

© Stack Overflow or respective owner

Related posts about grails