이 문서는 SonarQube에서 커스텀 에러 페이지 설정에 대한 가이드를 공유하기 위해 작성되었다. 


먼저 다음 경로의 web.xml 파일에 Edit 모드로 Open 한다.

<install-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>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>



다음 경로에 error.html 에러 페이지를 생성한다.

<install-directory>/web/error.html


<html>
<head>
</head>
<body>
    <header>
        <article>
            <h1>Error</h1>
        </article>
    </header>
</body>
</html>