1、web项目有时候会出现"Cannot change version of project facet Dynamic Web Module to 3.1 ", 这时请首先修改此项目的web.xml文件,使文件头部声明为
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee">
另外,切换到eclipse的navigator视图,并如下操作:
2、eclipse经常卡在"loading descriptor for XXX", 这时 clipse左侧的 Project Explorer 的右边一个按钮钮,鼠标移上去会提示”View Menu”点击。选择Customize View切换到Content勾选掉Java EE Navigator Content WEB最后重启下eclipse。Change the dynamic web module version in this line to 3.0 -
<installed facet="jst.web" version="2.5"/>
And then:
- Right-click on the project (in the Project Explorer panel).
- Select Maven » Update Project (or press Alt+F5)
You'll find this file in the
.settings
directory within the Eclipse project.
3、eclipse经常卡在"validate XXX "或者"build workspace", 这时可以如下操作:
1. 取消掉“project -> Buiild Automatically”选项;
2. 进入Windows->Preferences->Java->Editor->Hovers,然后关掉eclipse相关的hover选项;
3. 在设置里点击"validation",取消各种文件的“build"这一列。若不放心,可以在项目的具体文件右键选择"validate"即可。