1. 程式人生 > >Tomcat伺服器The origin server did not find a current representation for the target resource錯誤

Tomcat伺服器The origin server did not find a current representation for the target resource錯誤

除錯程式 伺服器 出現 The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. 錯誤 登陸 localhost:8080 依舊 同樣錯誤

將 伺服器 從eclipse 刪掉 新增新的伺服器 雙擊 server locations 可選,勾選中間一個。

如果還有錯誤 *********************************

2.檢查jsp檔案 WEB-INF檔案下的 jsp檔案使用者是不能直接訪問到的。好像是受保護的。 因此把jsp檔案 挪到 WebContent檔案下即可了。

正確做法是放在 WebContent 資料夾下面。 若把jsp 檔案 放到 WebContent 下面的資料夾裡面 。 訪問路徑為: localhost:8080 / 你的專案名稱 / 你的放jsp的資料夾/jsp檔名稱.jsp 如:http://localhost:8080/JSTLTest/jsp/JSTLTest.jsp

第一個JSTLTest 為專案名稱,jsp 為 WebContent 下面的 資料夾,專門存放 jsp檔案的。 然後 第二個 JSTLTest為jsp檔案。需要加字尾。