Eclipse deployment descriptor not found

2019-05-23 03:52发布

问题:

I have a dynamic web project created in eclipse. I moved the location of the WebContent folder (to be located within the /src folder). However, the project still thinks that the directory is under /projectName/WEB-INF/ (I know this because when I try to open an element in the deployment descriptor it tells me that that path does not exist (it doesn't exist, but I need to have it point to the new location).

How can I point the build to the new location of the WebContent folder (and WEB-INF etc.)? Thanks.

回答1:

Right click your dynamic web project -> Properties -> Deployment Assembly.

In Web Deployment Assembly, change the package structure to reflect your change. That should work.



回答2:

Go to windows > perspectives > reset perspective will possibly resolve this



回答3:

The original answer was unclear on the second step -- from the Web Deployment Assembly dialog, at the bottom is an Advanced toggle, which when opened will show the folder selection dropdown.

And I intended to give a link to the Eclipse documentation for the WTP Deployment Assembly Property Page -- however I cannot find it...