在用tomcat部署第一个javaweb程序,在检查了html 文件能用网页打开,配置文件地址名称正确。通过用排除法发现404的原因。
web.xml 部分代码:
<welcome-file-list>
<welcome-file>pages/index.html</welcome-file>
</welcome-file-list>
<listener>
<listener-class>websocket.drawboard.DrawboardContextListener</listener-class>
</listener>
浏览器结果
移除监听器listener后,重启Tomcat:Victory
<welcome-file-list>
<welcome-file>pages/index.html</welcome-file>
</welcome-file-list>