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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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