开发者

Don't displayed custom error page on jsp

I wan't to displey own 404 page. in web.xml i defined

<error-page>
    <error-code>404</error-开发者_如何转开发code>
    <location>/WEB-INF/jsp/error/error404.html</location>
</error-page>

In my filter I throw this error the next way:

response.sendError(404);
System.out.println("telst log: 404");

In logs i see my log, but page doest displayed correctly. Brouser print

Oops! This link appears to be broken.

But when I look at source code of the page, there is html code of my page!!!

Could enybody help ? Thanks.

brouser : crome , IE. Server - JBoss 5.1


Read http://en.wikipedia.org/wiki/HTTP_404#Custom_error_pages and http://www.thesitewizard.com/webdesign/google-chrome.shtml. IE and Chrome replace the custom page by their own 404 page if the custom page is less than 512 bytes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜