Problems with deploying your app to GAE/J

I had a very annoying problem lately. The deployment of my app to GAE was failing randomly with mysterious errors like this:
SEVERE: Received IOException parsing the input stream for /home/.../war/WEB-INF/web.xml Connection timed out
        at Method)
SEVERE: Received exception processing /home/.../war/WEB-INF/web.xml Received
IOException parsing the input stream for /home/.../war/WEB-INF/web.xml

After an extended googling session I unearthed a solution in this helpful discussion thread. Just replace the doctype declaration in your web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

with the following updated version:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi=""
 xmlns="" xmlns:web=""

That's all, one click deployment is working reliably again!