在用错误网页的时候,出现很奇怪的现象:
<error-page>
<error-code>404</error-code>
<location>error-404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>error-500.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file>addMessage.jsp</welcome-file>
进该项目的时候报404错误,
<error-page>
<error-code>404</error-code>
<location>/error-404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error-500.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file>addMessage.jsp</welcome-file>
加上"/" 之后正确显示