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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -