...
먼저 다음 경로의 web.xml 파일에 Edit 모드로 Open 한다.
코드 블럭 |
---|
<install-directory>web\directory>/web/WEB-INF\/web.xml |
다음과 같은 코드를 <<web-app></web-app> 앞에 사이에 추가한다.
코드 블럭 |
---|
<web-app>
.
.
<error-page>
<error-code>400</error-code>
<location>/error.html</location>
</error-page>
<error-page>
<error-code>401</error-code>
<location>/error.html</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404
<error-code>402</error-code>
<location>/error.html</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/error.html</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/error.html</location>
</error-page>
<error-page>
<error-code>405</error-code>
<location>/error.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error.html</location>
</error-page>
</web-app> |
다음 경로에 404error.html 에러 페이지를 생성한다.
코드 블럭 |
---|
<install-directory>webdirectory>/web/error.html |
코드 블럭 |
---|
language | xml |
---|
title | error.html |
---|
|
<html>
<head>
</head>
<body>
<header>
<article>
<h1>Error</h1>
</article>
</header>
</body>
</html> |