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 foot

题目

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 %>’ />

相似考题

3.共用题干 第一篇There are many ways of defining success.It is accurate to say that each of us has our own concept of success to the extent that each of us is responsible for setting our own goals and determining whether we have met these goals satisfactorily.Because each of us possesses unique differences in genetic ability and favorable environments in which to express these abilities,it is necessarily true that we must define success broadly.For some people,simply being able to live their life with a minimum of misery and suffering is considered a success.Think of the peace of mind of the poor shepherd who tends his sheep,enjoys his frugal life with his family in the beauty of nature,and who is respected because he does a good job of achieving the goals expected of and accepted by him and his society.On the other hand,it seems that even though some people appear to be rich in material possessions,many of them seem to be miserable and consider themselves unsuccessful when judged by their own standards of success. Because not all ventures can be successful,one should not set unrealistic goals for achieving suecess,but if one has self-confidence it would be unfortunate to set one's goals at too low a level of achievement.A wise counselor once said to a young man who was experiencing frustration with his own professional success:"You do not have to set your goal to reach the moon in order to have success in traveling. Sometimes one can be very successful merely by taking a walk in the park or riding the subway downtown."The counselor added,"You have not really failed and spoiled your chances for success until you have been unsuccessful at something you really like,and to which you have given your best effort."This passage mainly talks about__________.A:the definition of success B:how to set goalsC:how to achieve success D:the importance of goals

参考答案和解析
正确答案:C
更多“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 foote”相关问题
  • 第1题:

    共用题干
    第一篇

    There are many ways of defining success.It is accurate to say that each of us has our own concept of success to the extent that each of us is responsible for setting our own goals and determining whether we have met these goals satisfactorily.Because each of us possesses unique differences in genetic ability and favorable environments in which to express these abilities,it is necessarily true that we must define success broadly.
    For some people,simply being able to live their life with a minimum of misery and suffering is considered a success.Think of the peace of mind of the poor shepherd who tends his sheep,enjoys his frugal life with his family in the beauty of nature,and who is respected because he does a good job of achieving the goals expected of and accepted by him and his society.On the other hand,it seems that even though some people appear to be rich in material possessions,many of them seem to be miserable and consider themselves unsuccessful when judged by their own standards of success. Because not all ventures can be successful,one should not set unrealistic goals for achieving suecess,but if one has self-confidence it would be unfortunate to set one's goals at too low a level of achievement.
    A wise counselor once said to a young man who was experiencing frustration with his own professional success:"You do not have to set your goal to reach the moon in order to have success in traveling. Sometimes one can be very successful merely by taking a walk in the park or riding the subway downtown."The counselor added,"You have not really failed and spoiled your chances for success until you have been unsuccessful at something you really like,and to which you have given your best effort."

    Some rich people consider themselves unsuccessful because_________.
    A:their life is miserable
    B:they do not live in peace
    C:their goals are too low
    D:they are not rich enough by their own standards

    答案:D
    解析:
    推断题。根据第一段最后一句:Because each of us possesses unique differences in genetic ability and favorable environments in which to express these abilities,it is necessarily true that we must define success broadly.由于每个人天赋有所不同,而且所拥有的可以使这种天赋得以实现的有利环境也因人而异,确实应该对成功做一个广义的定义。该句话暗示取得成功的主要因素就是能力和环境。因此正确答案选C。
    词义推断题。thrifty“节约的”; wealthy“富有的”; wasteful“浪费的”; miserable“可怜的,悲惨的”。根据该句中…poor shepherd...enjoy his frugal life…以及后一句话中的 On the other hand ,...appear to be rich....seem to be miserable…通过对照来说明财富并不是评判成功的标准。贫穷的牧羊人虽然生活节俭但很享受,而有钱人却过着自认为悲惨的生活。
    细节题。根据第二段第三句:...some people appear to be rich in material possessions,…consider themselves unsuccessful when judged by their own standards of success.有的人似乎物质上很富裕,可是按照他们自己对于成功的判断标准来看,他们却并不认为自己成功。由此可知,有些富人之所以觉得自己不成功就是因为他们按照自己对于成功的标准来判断。因此正确答案选D。
    推断题。最后一段最后一句:The counselor added,"You have not really failed and spoiled your chances for success until you have been unsuccessful at something you really like , and to which you have given your best effort.”这位咨询人员补充道:除非你已经尽力而为但没有做成自己特别喜欢的事情,否则你并没有失败,也没有减少成功的概率。由此可以推断:只有已经尽力而为但没有做成自己喜欢的事情才是失败,只要是尽力做好自己喜欢的事情就是成功。因此正确答案选D。
    主旨题。根据第一段第一句:There are many ways of defining success.和最后一句:...it is necessarily true that we must define success broadly.可知本文主要内容即成功的定义。第二段主要通过举例子的方式来说明成功的定义可以很宽泛。最后一段则是通过一位咨询人士之口来暗示出:只要尽最大的努力去做自己喜欢的事情就是成功。因此正确答案选A。

  • 第2题:

    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

  • 第3题:

    You are the desktop administrator for one of your company's branch offices. The network in your branch office contains 100 Windows XP Professional computers. The computers are configured with the Compatws.inf security template. One of the network administrators in the company's main office creates a new security template named CompanySec.inf. The new template is designed to be applied to each of the company's Windows XP Professional computers. The users in your branch office have different security requirements from the users in the main office. You need to find out whether the new security template will violate the security requirements of the users in the branch office. What should you do?()

    • A、Run the Secedit.exe command in validation mode and specify the new security template.
    • B、Run the Secedit.exe command in configuration mode and specify the new security template. 
    • C、Use the Security Configuration and Analysis console to import both templates into a security database, and then perform an Analyze operation. 
    • D、Use the Security Configuration and Analysis console to import both templates into a security database, and then perform a Configure operation. 

    正确答案:C

  • 第4题:

    You are an administrator of a small business network. You have one dial-up account at an ISP and want all computers on your network connect to the Internet.  You have enabled Internet connection sharing. You do not want to initiate this connection automatically when a request for Internet reaches your computer. What should you do? ()

    • A、You should uncheck “Enable on demand dialing
    • B、Enable on-demand dialing
    • C、Enable sharing a modem on one computer on the network
    • D、Configure a DHCP Server
    • E、Disable Internet Connection Sharing

    正确答案:A

  • 第5题:

    You are building JSP pages that have a set of menus that are visible based on a user’s security role. Thesemenus are hand-crafted by your web design team; for example, the SalesManager role has a menu in thefile /WEB-INF/html/sales-mgr-menu.html. Which JSP code snippet should be used to make this menuvisible to the user?()

    • A、<% if ( request.isUserInRole("SalesManager") ) { %> <%@ include file=’/WEB-INF/html/sales-mgr-menu.html’ %> <% } %>
    • B、<jsp:if test=’request.isUserInRole("SalesManager")’> <%@ include file=’/WEB-INF/html/sales-mgr-menu.html’ %> </jsp:if>
    • C、<% if ( request.isUserInRole("SalesManager") ) { %> . <jsp:include file=’/WEB-INF/html/sales-mgr-menu.html’ /> . <% } %>
    • D、<jsp:if test=’request.isUserInRole("SalesManager")’> <jsp:include file=’/WEB-INF/html/sales-mgr-menu.html’ /> </jsp:if>

    正确答案:A

  • 第6题:

    A Company.com developer has created a web application that includes a servlet for each use case in the application. These servlets have become rather difficult to maintain because the request processing methods have become very large. There is also common processing code in many servlets because these use cases are very similar.  Which two design patterns can be used together to refactor and simplify this web application? ()

    • A、 Proxy
    • B、 View Helper
    • C、 Front Controller
    • D、 Session Façade
    • E、 Business Delegate
    • F、 Model-View-Controller

    正确答案:C,F

  • 第7题:

    Your network consists of an Active Directory domain named contoso.com. You have a computer namedcomputer1.contoso.com. Your network is configured to use only IPv6. You need to request that a DNS record be created to enable users to connect to your computer by using the name dev.contoso.com.  Which type of record should you request ?()

    • A、A
    • B、AAAA
    • C、HINFO
    • D、NAPTR

    正确答案:B

  • 第8题:

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

  • 第9题:

    单选题
    You are building JSP pages that have a set of menus that are visible based on a user’s security role. Thesemenus are hand-crafted by your web design team; for example, the SalesManager role has a menu in thefile /WEB-INF/html/sales-mgr-menu.html. Which JSP code snippet should be used to make this menuvisible to the user?()
    A

    <% if ( request.isUserInRole(SalesManager) ) { %> <%@ include file=’/WEB-INF/html/sales-mgr-menu.html’ %> <% } %>

    B

    <jsp:if test=’request.isUserInRole(SalesManager)’> <%@ include file=’/WEB-INF/html/sales-mgr-menu.html’ %> </jsp:if>

    C

    <% if ( request.isUserInRole(SalesManager) ) { %> . <jsp:include file=’/WEB-INF/html/sales-mgr-menu.html’ /> . <% } %>

    D

    <jsp:if test=’request.isUserInRole(SalesManager)’> <jsp:include file=’/WEB-INF/html/sales-mgr-menu.html’ /> </jsp:if>


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

  • 第10题:

    多选题
    A Company.com developer has created a web application that includes a servlet for each use case in the application. These servlets have become rather difficult to maintain because the request processing methods have become very large. There is also common processing code in many servlets because these use cases are very similar.  Which two design patterns can be used together to refactor and simplify this web application? ()
    A

    Proxy

    B

    View Helper

    C

    Front Controller

    D

    Session Façade

    E

    Business Delegate

    F

    Model-View-Controller


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

  • 第11题:

    问答题
    Practice 3  Your TV set broke down only one week after it was brought. Write a letter of complaint to the store where your TV set was bought.  1) to express what is wrong with your TV set  2) to make your request (change for a new one, or return the broken one... )  3) to urge the store to give an early reply  You should write approximately 100 words. Do not sign your own name at the end of your letter. Use “Wang Lin” instead. You do not need to write your address and the date.

    正确答案: 【参考范文】
    Dear Sir or Madam,
    Last week I bought a TV set from your store. Unfortunately, your product was unable to work properly. It always stops working suddenly and the screen becomes blank. And it broke down this morning. To resolve the problem, I would like you to return my money back, or change a new set for me.
    I’m looking forward to your early reply and a resolution to my problem, and I will wait a reasonable amount of time before taking this matter further.
    Thank you for taking time to read this letter.
    Sincerely,
    Wang Lin
    解析: 暂无解析

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

    A developer has created a web application that includes a servlet for each use case in the application.These servlets have become rather difficult to maintain because the request processing methods havebecome very large. There is also common processing code in many servlets because these use cases arevery similar. Which two design patterns can be used together to refactor and simplify this web application?()

    • A、Proxy
    • B、View Helper
    • C、Front Controller
    • D、Session Facade
    • E、Business Delegate
    • F、Model-View-Controller

    正确答案:C,F

  • 第14题:

    A developer is designing a web application that must verify for each request: The originating request is froma trusted network. The client has a valid session.The client has been authenticated. Which design pattern provides a solution in this situation?()

    • A、Transfer Object
    • B、Session Facade
    • C、Intercepting Filter
    • D、Template Method
    • E、Model-View-Controller

    正确答案:C

  • 第15题:

    Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface: public interface ApplicationController {public String invoke(HttpServletRequest request)} The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext. Which code snippet of the FrontController servlet accomplishes this goal?()

    • A、Dispatcher view=context.getDispatcher(viewURL);view.forward Request(request, response);
    • B、Dispatcher view=request.getDispatcher(viewURL);view.forward Request(request, response);
    • C、RequestDispatcher view. =context.getRequestDispatcher(viewURL);view.forward(request,response);
    • D、RequestDispatcher view=request.getRequestDispatcher(viewURL);view.forward(request, response);

    正确答案:D

  • 第16题:

    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

  • 第17题:

    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

  • 第18题:

    You completed the development of a new application and want to create a new domain in a new environment for functional testing. You want to have the same settings for your new domain as your old domain, with the option of changing the configuration in the new target environment. Which two actions should you execute?()

    • A、Use the introspect () command in WLST to gather the configuration information from the  original domain.
    • B、Use pack/unpack to transfer the domain from one machine to another.
    • C、Create a domain template from the original domain using the Domain Template Builder and use  the Configuration Wizard to create a new domain from the template.
    • D、Use the Admin Console of the original domain to create a domain template from the original  domain and use the Configuration Wizard to create a new domain from the template.

    正确答案:C

  • 第19题:

    You are the network administrator for your company. The network contains a single Active Directory domain. All computers on the network are members of the domain. All domain controllers run Windows Server 2003.   You are planning a public key infrastructure (PKI). The PKI design documents for your company specify that certificates that users request to encrypt files must have a validity period of two years.   The validity period of a Basic EFS certificate is one year. In the Certificates Templates console, you attempt to change the validity period for the Basic EFS certificate template. However, the console does not allow you to change the value.  You need to ensure that you can change the value of the validity period of the certificate that users request to encrypt files. What should you do?  ()

    • A、 Install an enterprise certification authority (CA) in each domain.
    • B、 Assign the Domain Admins group the Allow - Full Control permission for the Basic EFS certificate template.
    • C、 Create a duplicate of the Basic EFS certificate template. Enable the new template for issuing certificate authorities.
    • D、 Instruct users to connect to the certification authority (CA) Web enrollment pages to request a Basic EFS certificate.

    正确答案:C

  • 第20题:

    单选题
    You are an administrator of a small business network. You have one dial-up account at an ISP and want all computers on your network connect to the Internet.  You have enabled Internet connection sharing. You do not want to initiate this connection automatically when a request for Internet reaches your computer. What should you do? ()
    A

    You should uncheck “Enable on demand dialing

    B

    Enable on-demand dialing

    C

    Enable sharing a modem on one computer on the network

    D

    Configure a DHCP Server

    E

    Disable Internet Connection Sharing


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

  • 第21题:

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

  • 第22题:

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

  • 第23题:

    单选题
    You are the network administrator for your company. The network contains a single Active Directory domain. All computers on the network are members of the domain. All domain controllers run Windows Server 2003.   You are planning a public key infrastructure (PKI). The PKI design documents for your company specify that certificates that users request to encrypt files must have a validity period of two years.   The validity period of a Basic EFS certificate is one year. In the Certificates Templates console, you attempt to change the validity period for the Basic EFS certificate template. However, the console does not allow you to change the value.  You need to ensure that you can change the value of the validity period of the certificate that users request to encrypt files. What should you do?  ()
    A

     Install an enterprise certification authority (CA) in each domain.

    B

     Assign the Domain Admins group the Allow - Full Control permission for the Basic EFS certificate template.

    C

     Create a duplicate of the Basic EFS certificate template. Enable the new template for issuing certificate authorities.

    D

     Instruct users to connect to the certification authority (CA) Web enrollment pages to request a Basic EFS certificate.


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