eclipse建立web項目webapp目錄爲空(沒有web.xml文件)、修改web版本號
前路坑太多,走路有點簸。
1、使用eclipse建立web項目時,webapp目錄下面什麼都沒有(固然也沒有web.xml文件),解決辦法以下:
一、項目右鍵——>properties——>project faceets——>把「Dynamic Web Module」前面的鉤去掉——>apply——>OK

二、項目右鍵——>properties——>project faceets——>把「Dynamic Web Module」前面的鉤加上——>Further configuration available

新彈出的對話框——>將Content directory中的內容修改成:src/main/webapp——>在generate web.xml development descriptor前面加上鉤——>OKweb

返回以前的對話框——>apply——>OKapp

三、完成上述步驟後,一切都變好了

2、修改web版本號eclipse
。webapp
。ide
。code
。xml