Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page 

题目

Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page mechanism, and outputs the message "File notfound" in the response?()

  • A、<c:try catch="ex"><my:errorProne /></c:try>${ex.message}
  • B、<c:catch var="ex"><my:errorProne /></c:catch>${ex.message}
  • C、<c:try>. <my:errorProne />. </c:try>. <c:catch var="ex" />. ${ex.message}
  • D、<c:try>. <my:errorProne />. <c:catch var="ex" />. ${ex.message}. </c:try>

相似考题
参考答案和解析
正确答案:B
更多“Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page m”相关问题
  • 第1题:

    在J2EE中,对于以下的include指令和include动作,书写正确的是() 

    • A、<jsp:include page=http://localhost:/8080/my.jsp/> 
    • B、<%@ include file=http://localhost:/8080/my.jsp/>
    • C、<jsp:include file=http://localhost:/8080/my.jsp/> 
    • D、<%@ include page=http://localhost:/8080/my.jsp/>

    正确答案:A,B

  • 第2题:

    A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()

    • A、 id
    • B、 type
    • C、 name
    • D、 class
    • E、 scope
    • F、 create

    正确答案:A,D

  • 第3题:

    A user is attempting to access a website but is getting a ‘Page cannot be displayed’ error. The technician checks the IP address of the computer and sees that it has been assigned 169.254.10.70. Which of the following is the MOST likely cause?()

    • A、The device is located behind a firewall.
    • B、The network card is disabled.
    • C、The device is not configured for DHCP.
    • D、The device cannot locate a DHCP server.

    正确答案:D

  • 第4题:

    A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1.<%@ taglib prefix="x" 2.tagdir="/WEB-INF/tags/alpha" %> 3. The sort.jsp page is requested. Which two are true?()

    • A、Tag files can only be accessed using a tagdir attribute.
    • B、The sort.jsp page translates successfully and invokes the tag defined by beta.tag.
    • C、The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.
    • D、Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.
    • E、The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.

    正确答案:B,E

  • 第5题:

    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

  • 第6题:

    单选题
    要设置某个JSP页面为错误处理页面,以下page指令正确的是()。
    A

    〈%@ page errorPage=true%〉

    B

    〈%@ page isErrorPage=true%〉

    C

    〈%@ page extends=javax.servlet.jsp.JspErrorPage%〉

    D

    〈%@ page info=error%〉


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

  • 第7题:

    单选题
    Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page mechanism, and outputs the message "File notfound" in the response?()
    A

    <c:try catch=ex><my:errorProne /></c:try>${ex.message}

    B

    <c:catch var=ex><my:errorProne /></c:catch>${ex.message}

    C

    <c:try>. <my:errorProne />. </c:try>. <c:catch var=ex />. ${ex.message}

    D

    <c:try>. <my:errorProne />. <c:catch var=ex />. ${ex.message}. </c:try>


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

  • 第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题:

    单选题
    Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page mechanism, and outputs the message "File notfound" in the response?()
    A

    <c:try catch=ex><my:errorProne /></c:try>${ex.message}

    B

    <c:catch var=ex><my:errorProne /></c:catch>${ex.message}

    C

    <c:try>. <my:errorProne />. </c:try>. <c:catch var=ex />. ${ex.message}

    D

    <c:try>. <my:errorProne />. <c:catch var=ex />. ${ex.message}. </c:try>


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

  • 第10题:

    多选题
    A user logs in and is mapped to two roles. The first role has a maximum timeout value of 600 minutes and the default Juniper Networks logo on the user interface page. The second role has a maximum timeout value of 1200 minutes and a custom logo on the user interface page. Based on the merging of these two roles, which two will be applied?()
    A

    A custom logo on the user interface page

    B

    A maximum timeout value of 600 minutes

    C

    A maximum time out value of 1200 minutes

    D

    A default Juniper Networks logo on the user interface page


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

  • 第11题:

    单选题
    Which option prevents the exception thrown by my:errorProne from invoking the error page mechanism and outputs the message "File not found" in the response?()
    A

    A

    B

    B

    C

    C

    D

    D

    E

    E


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

  • 第12题:

    多选题
    在J2EE中,对于以下的include指令和include动作,书写正确的是()
    A

    <jsp:include page=http://localhost:/8080/my.jsp/>

    B

    <%@ include file=http://localhost:/8080/my.jsp/>

    C

    <jsp:include file=http://localhost:/8080/my.jsp/>

    D

    <%@ include page=http://localhost:/8080/my.jsp/>


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

  • 第13题:

    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

  • 第14题:

    Which three occur during JSP page translation?()

    • A、 The jspInit method is called.
    • B、 The JSP page implementation class is created.
    • C、 The JSP page implementation class is compiled.
    • D、 The JSP page is validated for syntatic correctness.
    • E、 The associated tag files are validated for syntatic correctness.

    正确答案:B,C,D

  • 第15题:

    You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the  tag that requires the page name tobe specified dynamically when the header is imported. Which JSP code snippet performs the import of theheader content?() <title>

    • A、<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>
    • B、<jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>
    • C、<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>
    • D、<jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>

    正确答案:A

  • 第16题:

    A JSP page needs to instantiate a JavaBean to be used by only that page.  Which two jsp:useBeanattributes must be used to access this attribute in the JSP page?()

    • A、Id
    • B、Type
    • C、Name
    • D、Class
    • E、Yscope

    正确答案:A,D

  • 第17题:

    单选题
    You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the  tag that requires the page name tobe specified dynamically when the header is imported. Which JSP code snippet performs the import of theheader content?()
    A

    <jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>

    B

    <jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>

    C

    <jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>

    D

    <jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>


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

  • 第18题:

    多选题
    A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1. 3. The sort.jsp page is requested. Which two are true?()
    A

    Tag files can only be accessed using a tagdir attribute.

    B

    The sort.jsp page translates successfully and invokes the tag defined by beta.tag.

    C

    The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.

    D

    Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.

    E

    The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.


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

  • 第19题:

    多选题
    Which three occur during JSP page translation?()
    A

    The jspInit method is called.

    B

    The JSP page implementation class is created.

    C

    The JSP page implementation class is compiled.

    D

    The JSP page is validated for syntatic correctness.

    E

    The associated tag files are validated for syntatic correctness.


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

  • 第20题:

    单选题
    ()用于声明当前页为error页?
    A

    <%@ page errorPage=true %>

    B

    <%@ page info=error %>

    C

    <%@ page pageEndcoding=error %>

    D

    <%@ page isErrorPage=true %>


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

  • 第21题:

    多选题
    Given in a single JSP page:   Which two are true?()
    A

    The prefix ’java’ is reserved.

    B

    The URI ’myTags’ must be properly mapped to a TLD file by the web container.

    C

    A translation error occurs because the prefix is considered identical by the web container.

    D

    For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.


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

  • 第22题:

    多选题
    A JSP page needs to instantiate a JavaBean to be used by only that page.  Which two jsp:useBeanattributes must be used to access this attribute in the JSP page?()
    A

    Id

    B

    Type

    C

    Name

    D

    Class

    E

    Yscope


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

  • 第23题:

    多选题
    A JSP page needs to set the property of a given JavaBean to a value that is calculated with the JSP page. Which three jsp:setProperty attributes must be used to perform this initialization?()
    A

    Id

    B

    Val

    C

    Name

    D

    Param

    E

    Value

    F

    Property


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