| Summary: | JSF Facet completely overwrites the web.xml if the deployment assembly contains several folders | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Java Server Faces | Reporter: | Fred Bricon <fbricon> | ||||
| Component: | Core | Assignee: | Ian Trimble <ian.trimble> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | raghunathan.srinivasan | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.2.5 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 355150 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Fred Bricon
Created attachment 200868 [details]
Sample project to reproduce the issue
Note that I'm aware of model.setBooleanProperty(IJSFFacetInstallDataModelProperties.CONFIGURE_SERVLET,false) which prevents messing with web.xml updates. The problem occurs when it's set to true. I have logged the blocking bug 355150 against jst.jee, since we rely on their ModelProviderManager to get the web model, and it is being provided without content of the web.xml in the second web root. Note the "Deployment Descriptor" explorer node on opening the project (even before adding the JSF facet) - it shows no content, implying there are issues with the provider understanding multiple web roots. Fix committed to 3.2.5 stream at 2011/08/24 11:36AM PDT. See bug 355150 (and the bug it refers to) to understand the recent change made by the jst.jee team so that their subsystem more accurately tracks the "default" web root folder. In a nutshell, along with the changes made to the JSF facet install delegate, your project needs to have its .component file tweaked slightly; on the web root you consider default (i.e. where you have your existing web.xml file), you need to add the attribute "tag", with the value "defaultRootSource". That is, your .component file needs to change from what is in the attached sample project to the following: <?xml version="1.0" encoding="UTF-8"?> <project-modules id="moduleCoreId" project-version="1.5.0"> <wb-module deploy-name="foo"> <wb-resource deploy-path="/" source-path="/Empty"/> <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> <property name="context-root" value="foo"/> <property name="java-output-path" value="/foo/build/classes"/> </wb-module> </project-modules> The JSF Facet install delegate will then be handed a populated (instead of empty) model, and will be able to recognize this and act appropriately. Fix committed to HEAD (3.3.1 and 3.4.0) stream at 2011/08/24 12:18PM PDT. Fix released to 3.2.5, 3.3.1 and 3.4.0 streams. |