Oleksandr
Oleksandr

Reputation: 2416

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

Upvotes: 0

Views: 508

Answers (1)

JB Nizet
JB Nizet

Reputation: 691735

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.

Upvotes: 2

Related Questions