Community
Participate
Working Groups
Scenario to reproduce: Create a Dynamic Web Project, specify the version as 2.2. Bring up the context menu on the project Select New and notice that both Filter and Listener are present. If you use either the New Filter or New Listener wizard, you can also select a Web 2.2 project as the target project. Finish is enabled. However, once the wizard is finished, an error is shown in web.xml that states that: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)". This is correct, since both Filters and Listeners were introduced in the Servlet 2.3 specification. We should not show the entries in the context menu and we should remove Web 2.2 projects from the list of selectable target projects for these two wizards.
Kaloyan, can your team investigate this? Please retarget as appropriate.
Good catch. Honestly, I am not quite familiar with the older versions of the J2EE specification.
Not a major issue, nor a regression. Let's leave it for 3.2.1.
Created attachment 172312 [details] patch The attached patch resolves the problem with the following changes: 1) Modifies the navigatorContent description, so the New Filter and New Listener wizards does not appear in the context menu of Web 2.2 projects 2) Introduces new property tester that test the project facet of an ICompressedNode object. This is needed by 1) 3) Removes the 'Filter', 'Filter Mapping' and 'Listener' nodes from the Web 2.2 DD tree 4) Filters (does not show) Web 2.2 in the project list of New Filter and New Listener wizards.
Chuck, please review this patch for 3.2.1. Some of the changes may be considered as UI change. If you think so, please raise this bug for PMC approval.
Approved - talked it over with Carl, I don't think PMC is required on this change... only "removing" or filtering existing navigator content based on spec version
Committed to HEAD for 3.2.1 and 3.3