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 fi

题目

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.

相似考题
更多“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 fi”相关问题
  • 第1题:

    A JSP page needs to perform some operations before servicing the first request. Where can this be done?()

    • A、 within a method called jspInit
    • B、 within the page directive of the JSP page
    • C、 within a scriptlet at the top of the JSP page
    • D、 within the  XML element

    正确答案:A

  • 第2题:

    You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()

    • A、In the init method.
    • B、In the jspInit method.
    • C、In the constructor of the JSP’s Java code.
    • D、In a JSP declaration, which includes an initializer block.
    • E、In a JSP declaration, which includes a static initializer block.

    正确答案:B,D,E

  • 第3题:

    You need to create a JavaBean object that is used only within the current JSP page. It must NOT beaccessible to any other page including those that this page might import. Which JSP standard action canaccomplish this goal?()

    • A、<jsp:useBean id=’pageBean’ type=’com.example.MyBean’ />
    • B、<jsp:useBean id=’pageBean’ class=’com.example.MyBean’ />
    • C、<jsp:makeBean id=’pageBean’ type=’com.example.MyBean’ />
    • D、<jsp:makeBean id=’pageBean’ class=’com.example.MyBean’ />

    正确答案:B

  • 第4题:

    在JSP中要使用user包中的User类,则以写法正确的是()。

    • A、〈jsp:useBean id="user" class="user.User" scope="page"/〉
    • B、〈jsp:useBean class="user.Use.class"/〉
    • C、〈jsp:useBean name="user" class="user.User"/〉
    • D、〈jsp:useBeam id="user" class="user" import="user.*"/〉

    正确答案:A

  • 第5题:

    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

  • 第6题:

    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

  • 第7题:

    单选题
    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
    解析: 暂无解析

  • 第8题:

    多选题
    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
    解析: 暂无解析

  • 第9题:

    单选题
    如果不希望JSP网页支持Session,应该如何办?()
    A

    调用HttpSession的invalidate()方法

    B

    〈%@ page session=false /〉

    C

    〈%@ page session 〉

    D

    〈jsp:useBean id= user class= UserData scope= session /〉


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

  • 第10题:

    单选题
    A JSP page needs to perform some operations before servicing the first request. Where can this be done?()
    A

     within a method called jspInit

    B

     within the page directive of the JSP page

    C

     within a scriptlet at the top of the JSP page

    D

     within the  XML element


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

  • 第11题:

    多选题
    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
    解析: 暂无解析

  • 第12题:

    单选题
    Your web application views all have the same header, which includes the  tag in the  elementof the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put itinto a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you havedecided to use a variable called pageTitle to parameterize this in the header JSP, like this: 10.${param.pageTitle} Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()
    A

    <jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert>

    B

    <jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>

    C

    <jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>

    D

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

    E

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


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

  • 第13题:

    Which JSP standard action can be used to import content from a resource called foo.jsp?()

    • A、<jsp:import file=’foo.jsp’ />
    • B、<jsp:import page=’foo.jsp’ />
    • C、<jsp:include page=’foo.jsp’ />
    • D、<jsp:include file=’foo.jsp’ />

    正确答案:C

  • 第14题:

    To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10. 11.  14. 15. Which JSP code snippet declares that this JSP Document is a JavaScript file?()

    • A、<%@ page contentType=’application/javascript’ %>
    • B、<jsp:page contentType='application/javascript' />
    • C、<jsp:document contentType='application/javascript' />
    • D、<jsp:directive.page contentType='application/javascript' />
    • E、No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the <script> tag.

    正确答案:D

  • 第15题:

    如果想要在JSP中使用user包中的User类,则以下写法正确的是()。 

    • A、 <jsp:useBean id="user" class="user.User" scope="page"/>
    • B、 <jsp:useBean class="user.User.class" /> 
    • C、 <jsp:useBean name="user" class="user.User"/>
    • D、 <jsp:useBean id="user" class="User" import="user.* "/>

    正确答案:A

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

    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

  • 第18题:

    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

    正确答案:C,E,F

  • 第19题:

    多选题
    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
    解析: 暂无解析

  • 第20题:

    多选题
    You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()
    A

    In the init method.

    B

    In the jspInit method.

    C

    In the constructor of the JSP’s Java code.

    D

    In a JSP declaration, which includes an initializer block.

    E

    In a JSP declaration, which includes a static initializer block.


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

  • 第21题:

    单选题
    Which JSP standard action can be used to import content from a resource called foo.jsp?()
    A

    <jsp:import file=’foo.jsp’ />

    B

    <jsp:import page=’foo.jsp’ />

    C

    <jsp:include page=’foo.jsp’ />

    D

    <jsp:include file=’foo.jsp’ />


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

  • 第22题:

    单选题
    在JSP页面中,正确引入JavaBean的是()
    A

    <%jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” %>  

    B

    <jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” >  

    C

    <jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” /> 

    D

    <jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” />


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

  • 第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
    解析: 暂无解析