[轉]The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

來源:互聯網
上載者:User

標籤:provided   alt   err   images   detail   logs   seq   nbsp   spec   

完整錯誤資訊:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESSFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THECOPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICTLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING INANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE.

Description Resource Path Location Type

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path add.jsp /dwz-Java/WebContent/WEB-INF/jsp/management/news line 1 JSP Problem

簡而言之:沒有配置Web伺服器。

 

 

 

在出現此錯誤的項目上單擊滑鼠右鍵-->Build Path-->Configure Build Path

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

到了添加Server Library步驟時,裡面是空選項,沒有Tomcat 7.0選擇,怎麼辦?

1、選擇 eclipse 的WIndows菜單》Preferences 預設

 

 

2、在左側列表中找到 Server 項,展開,選中:Runtime Environments,右側點擊添加按鈕

 

 

 

3、這裡要根據你使用的 Tomcat 版本來選擇,不一定是 Tomcat 7.0;

我這裡是示範添加 Tomcat,當然也可以選擇添加 IBM 的 Liberty ,或者 JBoss 之類的 Web 服務器(Java EE容器)

如果你還沒有安裝 Tomcat,那可以去官網下載一個壓縮包解壓到一個目錄就可以了。

 

 

 

4、點擊 Browse 按鈕選擇 Tomcat 所在的位置

選擇 JRE (Java Runtime Environment),當然你可以使用 Eclipse 內建的,

但如果你想使用自己安裝的版本就需要添加一下;初學使用內建的就可以了;

 

 

5、上面一切就緒點擊 Finish 按鈕就可以了。

 

 參考文檔:

http://blog.csdn.net/testcs_dn/article/details/36455669

http://blog.csdn.net/testcs_dn/article/details/70336604

 

 

 

 

 

[轉]The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.