2012-10-06 4 views
0

SCWCD 시험 준비 중입니다.이 질문에 대한 질문이 있습니다.web.xml의 오류 페이지

웹 응용 프로그램 배포 설명자 중 2 개가 유효합니까? (두를 선택합니다.)

A. <error-page> 
     <exception-type>*</exception-type> 
     <location>/error.html</location> 
     </error-page> 
    B. <error-page> 
     <exception-type>java.lang.Error</exception-type> 
     <location>/error.html</location> 
     </error-page> 
    C. <error-page> 
     <exception-type>java.lang.Throwable</exception-type> 
     <location>/error.html</location></error-page> 
    D. <error-page> 
      <exception-type>java.io.IOException</exception-type> 
      <location>/error.html</location> 
     </error-page> 
    E. <error-page> 
      <exception-type>NullPointerException</exception-type> 
      <location>/error.html</location> 
     </error-page> 

정답은 오류의 Throwable의 서브 클래스이기 때문에 캔트 상위를가 유효 이유 CD.but입니다. ErrorException 클래스의 JavaDoc에서

답변

0

:

오류가 합리적 응용 프로그램이라면 파악하려고 시도해서는 안되는 심각한 문제를 나타내는 Throwable의 서브 클래스입니다. 대부분의 이러한 오류가 비정상적인 상태입니다 [...]

Exception 클래스와 그 서브 클래스는 어플리케이션으로 캐치 될 가능성이있는 상태를 나타내는 Throwable의 한 형태입니다 [...]

그것은이 유형과 관련이 없으면 디자인 선택과 비슷합니다.

관련 문제