单选题Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()AErrorBExceptionCThrowableDRequest errorERequest exception

题目
单选题
Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()
A

 Error

B

 Exception

C

 Throwable

D

 Request error

E

 Request exception


相似考题
参考答案和解析
正确答案: C
解析: 暂无解析
更多“单选题Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()A  ErrorB  ExceptionC  ThrowableD  Request errorE  Request exception”相关问题
  • 第1题:

    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?()

    • A、Store the data in a public instance variable in the servlet.
    • B、Add an attribute to the request object before using the request dispatcher.
    • C、Add an attribute to the context object before using the request dispatcher.
    • D、This CANNOT be done as the tag handler has no means to extract this data.

    正确答案:B

  • 第2题:

    Which is a benefit of precompiling a JSP page?()

    • A、It avoids initialization on the first request.
    • B、It provides the ability to debug runtime errors in the application.
    • C、It provides better performance on the first request for the JSP page.
    • D、It avoids execution of the _jspService method on the first request.

    正确答案:C

  • 第3题:

    Which implicit object is used in a JSP page to retrieve values associated with  entries inthe deployment descriptor?()

    • A、Config
    • B、Request
    • C、Session
    • D、Application

    正确答案:D

  • 第4题:

    在jsp中作用域由小到大的组合是()

    • A、request page session application
    • B、page request session application
    • C、pageContext request session application
    • D、pageScope request sessionScope applicationScope

    正确答案:C

  • 第5题:

    Given an HttpServletRequest request, which retrieves an object of type Account with an Id of “account”?()

    • A、 Account account = request.get Resource(”account”):
    • B、 Account account = request.get Attribute (“account”):
    • C、 Account account = request.get Parameter (account”):
    • D、 Account account = (Account)request.getResource (“account”):
    • E、 Account account = (Account) request.get Attribute (“account”):
    • F、 Account account = (Account) request.get Paramter (“account”):

    正确答案:E

  • 第6题:

    You are creating an error page that provides a user-friendly screen whenever a server exception occurs.You want to hide the stack trace, but you do want to provide the exception’s error message to the user sothe user can provide it to the customer service agent at your company.  Which EL code snippet inserts thiserror message into the error page?()

    • A、Message: <b>${exception.message}</b>
    • B、Message: <b>${exception.errorMessage}</b>
    • C、Message: <b>${request.exception.message}</b>
    • D、Message: <b>${pageContext.exception.message}</b>
    • E、Message: <b>${request.exception.errorMessage}</b>

    正确答案:D

  • 第7题:

    单选题
    Given an HttpServletRequest request, which retrieves an object of type Account with an Id of “account”?()
    A

     Account account = request.get Resource(”account”):

    B

     Account account = request.get Attribute (“account”):

    C

     Account account = request.get Parameter (account”):

    D

     Account account = (Account)request.getResource (“account”):

    E

     Account account = (Account) request.get Attribute (“account”):

    F

     Account account = (Account) request.get Paramter (“account”):


    正确答案: C
    解析: 暂无解析

  • 第8题:

    单选题
    You are creating an error page that provides a user-friendly screen whenever a server exception occurs.You want to hide the stack trace, but you do want to provide the exception’s error message to the user sothe user can provide it to the customer service agent at your company.  Which EL code snippet inserts thiserror message into the error page?()
    A

    Message: <b>${exception.message}</b>

    B

    Message: <b>${exception.errorMessage}</b>

    C

    Message: <b>${request.exception.message}</b>

    D

    Message: <b>${pageContext.exception.message}</b>

    E

    Message: <b>${request.exception.errorMessage}</b>


    正确答案: E
    解析: 暂无解析

  • 第9题:

    单选题
    You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes. Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()
    A

    <jsp:insert page=’${bodyURL}’ />

    B

    <jsp:insert file=’${bodyURL}’ />

    C

    <jsp:include page=’${bodyURL}’ />

    D

    <jsp:include file=’${bodyURL}’ />

    E

    <jsp:insert page=’<%= bodyURL %>’ />


    正确答案: B
    解析: 暂无解析

  • 第10题:

    多选题
    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()
    A

    Add attributes to the session object.

    B

    Add attributes on the request object.

    C

    Add parameters to the request object.

    D

    Use the pageContext object to add request attributes.

    E

    Add parameters to the JSP’s URL when generating the request dispatcher.


    正确答案: E,A
    解析: 暂无解析

  • 第11题:

    多选题
    Which two are true concerning the objects available to developers creating tag files?()
    A

    The session object must be declared explicitly.

    B

    The request and response objects are available implicitly.

    C

    The output stream is available through the implicit outStream object.

    D

    The servlet context is available through the implicit servletContext object.

    E

    The JspContext for the tag file is available through the implicit jspContext object.


    正确答案: A,B
    解析: 暂无解析

  • 第12题:

    单选题
    在jsp中作用域由小到大的组合是()
    A

    request page session application

    B

    page request session application

    C

    pageContext request session application

    D

    pageScope request sessionScope applicationScope


    正确答案: C
    解析: 暂无解析

  • 第13题:

    For debugging purposes, you need to record how many times a given JSP is invoked before the user’ssession has been created. The JSP’s destroy method stores this information to a database. Which JSPcode snippet keeps track of this count for the lifetime of the JSP page?()

    • A、<%! int count = 0; %><% if ( request.getSession(false) == null ) count++; %>
    • B、<%@ int count = 0; %>. <% if ( request.getSession(false) == null ) count++; %>
    • C、<% int count = 0;. if ( request.getSession(false) == null ) count++; %>
    • D、<%@ int count = 0;. if ( request.getSession(false) == null ) count++; %>
    • E、<%! int count = 0;. if ( request.getSession(false) == null ) count++; %>

    正确答案:A

  • 第14题:

    所有异常的共同父类是()

    • A、Error
    • B、Exception
    • C、Throwable
    • D、RuntimeException

    正确答案:B

  • 第15题:

    Which the two are concerning the objects available to developers creating tag files?()

    • A、 The session object must be declared explicity.
    • B、 The request and response objects are available implicity.
    • C、 The output stream is available through the implicit outStream object.
    • D、 The servlet context is available through the implicit servletContext object.
    • E、 The JspContext for the tag file is available through the implicit jspContext object.

    正确答案:B,E

  • 第16题:

    You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes. Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()

    • A、<jsp:insert page=’${bodyURL}’ />
    • B、<jsp:insert file=’${bodyURL}’ />
    • C、<jsp:include page=’${bodyURL}’ />
    • D、<jsp:include file=’${bodyURL}’ />
    • E、<jsp:insert page=’<%= bodyURL %>’ />

    正确答案:C

  • 第17题:

    下面哪些类可用于throw语句()

    • A、Error
    • B、Exception
    • C、Event
    • D、Throwable

    正确答案:A,B,D

  • 第18题:

    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()

    • A、Add attributes to the session object.
    • B、Add attributes on the request object.
    • C、Add parameters to the request object.
    • D、Use the pageContext object to add request attributes.
    • E、Add parameters to the JSP’s URL when generating the request dispatcher.

    正确答案:B,E

  • 第19题:

    单选题
    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?()
    A

    Store the data in a public instance variable in the servlet.

    B

    Add an attribute to the request object before using the request dispatcher.

    C

    Add an attribute to the context object before using the request dispatcher.

    D

    This CANNOT be done as the tag handler has no means to extract this data.


    正确答案: B
    解析: 暂无解析

  • 第20题:

    单选题
    Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()
    A

     Error

    B

     Exception

    C

     Throwable

    D

     Request error

    E

     Request exception


    正确答案: B
    解析: 暂无解析

  • 第21题:

    单选题
    Given: What is the result?()
    A

    An Exception is thrown with no other output

    B

    followed by an Exception

    C

    Compilation fails due to an error on line 9

    D

    Compilation fails due to an error on line 14


    正确答案: C
    解析: 暂无解析

  • 第22题:

    单选题
    Which is a benefit of precompiling a JSP page?()
    A

    It avoids initialization on the first request.

    B

    It provides the ability to debug runtime errors in the application.

    C

    It provides better performance on the first request for the JSP page.

    D

    It avoids execution of the _jspService method on the first request.


    正确答案: C
    解析: 暂无解析

  • 第23题:

    单选题
    For debugging purposes, you need to record how many times a given JSP is invoked before the user’ssession has been created. The JSP’s destroy method stores this information to a database. Which JSPcode snippet keeps track of this count for the lifetime of the JSP page?()
    A

    <%! int count = 0; %><% if ( request.getSession(false) == null ) count++; %>

    B

    <%@ int count = 0; %>. <% if ( request.getSession(false) == null ) count++; %>

    C

    <% int count = 0;. if ( request.getSession(false) == null ) count++; %>

    D

    <%@ int count = 0;. if ( request.getSession(false) == null ) count++; %>

    E

    <%! int count = 0;. if ( request.getSession(false) == null ) count++; %>


    正确答案: B
    解析: 暂无解析

  • 第24题:

    单选题
    Which implicit object is used in a JSP page to retrieve values associated with  entries inthe deployment descriptor?()
    A

    Config

    B

    Request

    C

    Session

    D

    Application


    正确答案: A
    解析: 暂无解析