Here is my web.xml .
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>testApp</display-name>
<distributable/>
<context-param>
<param-name>
myContextParamName
</param-name>
<param-value>
myContextParamValue
</param-value>
</context-param>
</web-app>
We are using Sun Java System Application Server 8.1 ENTERPRISE Edition.
I tested the same code with Sun Java Studio Enterprise 8 integrated with Sun Java System Application Server Professional edition and it works fine.
I am not sure why it is not working with ENTERPRISE edition on our server. Looks like web.xml is not being considered by the server. I deleted web.xml and still I was able to deploy the application successfully.