1. 程式人生 > >idea沒有artifact以及測試Tomcat報404錯誤

idea沒有artifact以及測試Tomcat報404錯誤

1.關於新增不了artifact

2.關於瀏覽器測試tomcat啟動報404錯誤!

操作完上一步的小夥伴彈出瀏覽器可能會報404錯誤,,那是因為你web.xml沒有配置歡迎頁,找不到歡迎頁,所以404

Web.xml中新增

<welcome-file-list>
    <welcome-file>
index.jsp</welcome-file>
</welcome-file-list>

新建index.jsp,編寫Hello word

<html>

<body>

<h2>Hello World!</h2>

</body>

</html>

重啟tomcatOK