the "write once, deploy anywhere" claim is a statement about
Java in general.
the web server you're using should run anywhere that an equivalent JVM is available
there are certainly a lot of application server specific deployment details, sometimes because EJB doesn't specify how something should be done, other times because the server is trying to differentiate it's value to the customer,
some application servers may allow you to put all server specific configuration information external to a JAR/WAR/EAR/et al. AR but in reality it's not tough to reconfigure an AR to contain different server specific information, and could be automated with your build tools
of course, trying to maintain a consistency in that case could be a headache