Dao De Code

Root Application Context in Play 2.1

So Play 2.1 is officialy out and one of the new features it brings is the ability to configure root application context. It have been in 2.1 branch for a long-long time and I don't see this mentioned in highlights section, but nevertheless it's there and it works.
To assign a root context to your play app just open your application.conf file and add the following line


Make sure you have it starting with slash (/) otherwise play will throw a configuration error at you saying "Invalid application context".

comments powered by Disqus