Play! automatically creates a web.xml file when deploying your application. There are times when you need to edit web.xml for various reasons.
I needed to setup a listener for Spring and thus needed to edit this file. The instructions for doing this were not easily available so I will outline them here.
First create a new directory in your Play! application “war/WEB-INF”
Now copy the template web.xml from <PLAY_HOME>/resources/war/web.xml to <PLAY_APP_HOME>/war/WEB-INF/.
You would see that this file contains replacement tokens that Play! uses when building you application. These must be left as is. Otherwise you can edit to your heart’s content.