配置tomcat的错误404页面

自己写一个404对应的error.html文件,然后把该文件放到tomcat ROOT工程中,然后配置tomcat/conf/web.xml文件
增加如下代码

<error-page>
	<error-code>404</error-code>
	<location>/error.html</location>
</error-page>

猜你喜欢

转载自blog.csdn.net/huangbaokang/article/details/94744176