Community
Participate
Working Groups
Steps to reproduce: 1. Invoke the New Dynamic Web Project wizard. 2. Enter some Project name. 3. Choose '2.5' for Dynamic web module version. 4. Click Next twice. The 'Generate web.xml deployment descriptor' checkbox is unchecked. It should be only unchecked for version 3.0 and still checked for 2.5. In Galileo we had the checkbox checked for 2.5 by default. While it is still valid to have no web.xml for Web 2.5 projects, the problem gets bigger when you try to create new Servlet. After executing the New Servlet wizard, a web.xml file is generated, but the necessary servlet tags are not registered there.
We now have separate preferences for Web 2.5 and Web 3.0 defaults. (See bug 311729)
Created attachment 167932 [details] Set the default to true
Unfortunately, in bug 311729, the decision was made to not turn on the Web 2.5 deployment descriptor generation by default. This is a serious issue in WTP- not any adopter. We changed this setting from WTP 3.1.x to WTP 3.2 because we made our wizards and operations smart enough to generate the deployment descriptor if necessary. However, our merged model still has problems with the first servlet/filter/listener that is created.
approve
This bug results in the loss of the first servlet/filter/listener that is created in a Web 2.5 project- the class files remain, but the entry in the deployment descriptor is not generated and thus it is useless. The workaround is to generate the deployment descriptor for a Web 2.5 project before adding any servlets/listeners/filters. That is exceedingly error-prone. This fix has been tested by hand to guarantee that the deployment descriptor is created by default. Chuck Bridgham has reviewed this fix. The risk is minimal, and only in relation to the creation of a deployment descriptor upon creation of a Web 2.5 project.
Committed to HEAD for WTP 3.2 RC1