scala - How to access application.context property from Play 2.2 application? -
i access application.context property (which set in application.conf file) within play application. it's useful know property e.g. pass javascript, addresses in script can context independent.
i have looked in scala api, haven't found way obtain property.
in template file call javascript code:
@import play.api.play.current <script type="application/javascript"> var context = @play.api.play.configuration.getstring("application.context").getorelse("") </script>
Comments
Post a Comment