Updating web.xml on the Play! Framework 1.1.1

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.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Updating web.xml on the Play! Framework 1.1.1

  1. Nils says:

    Thanks, I’m struggling with an old play 1.2.7 application on jboss, this helped me out.

  2. rmauge says:

    I am glad that you found this helpful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s