我的设置:Apache 2.2 + Tomcat 6.0 @ Windows 2008 R2 64bit
- 静态网页:/
- 小服务程序:/foo
- tomcat 和 apache 通过 mod_jk 连接
- 404.jsp 放在tomcat\webapps\ROOT
Tomcat\conf\web.xml:
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
apache\conf\extra\httpd-ssl.conf:
JkMount /foo/* worker1
JkMount /404.jsp worker1
当我打开https://...../404.jsp时,会显示我的自定义错误页面。但是当我打开https://...../foo/nonexisting.html时,会显示一个空页面。
如果我<error-page>...</error-page>
从 web.xml 中删除代码并打开https://...../foo/nonexisting.html然后将显示 tomcats own 404。
有什么提示吗?