多选题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 com

题目
多选题
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

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第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 the three are true about servlet filters?()

  • A、 A filter must implement the destroy method
  • B、 A filter must implement the doFilter method
  • C、 A servlet may have multiple filters associated with it
  • D、 A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain  interface
  • E、 A filter that is part of a filter chain passes control to the next filter in the chain by invoking the filterChain forward method
  • F、 For each  element in the web application deployment descriptor, multiple instances of a filter may be created by the web container

正确答案:A,B,C

第3题:

Servlet A receives a request that it forwards to servlet B within another web application in the same webcontainer. Servlet A needs to share data with servlet B and that data must not be visible to other servlets inA’s web application. In which object can the data that A shares with B be stored?()

  • A、HttpSession
  • B、ServletConfig
  • C、ServletContext
  • D、HttpServletRequest
  • E、HttpServletResponse

正确答案:D

第4题:

Company.com has decided to use the FUBAR Application Server to host their web application. Unfortunately, the FUBAR Application Server uses the server machine’s file system for its JNDI namespace. Every JNDI lookup performed in the web application is translated into a file 1/0 operation, which results in very poor performance.  Which J2EE pattern can help with this performance issue?()

  • A、 Transfer Object
  • B、 Service Locator
  • C、 Intercepting Filter
  • D、 Model-View-Controller

正确答案:B

第5题:

Company.com has an application that has a hard-coded hostname in the startup routines. The application is being made highly available using HACMP. During testing, the application does not start on the standby node because the hostname was not what the application expected.  What can be done to fix this problem?()

  • A、 Manage the hostname in the application server start ands top scripts
  • B、 Nothing, because this application cannot be controlled by HACMP and should be started  with   /etc/inittab
  • C、 Change the hard-coded hostname in the application startup routines to use the uname rather than the hostname
  • D、 Override the default ha_hostname in the cluster configuration to reflect the shared hostname rather than the default ha_hostname

正确答案:A

第6题:

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You create a folder named Dark in the App_Themes folder of the Web application. You also addfour skin files to this folder. You have to make sure that the controls on a page have their appearances overridden by the control definitions defined in the skin files. What should you do?  Which Page directive should you use?()

  • A、You should use the page directive: <%@ Page StyleSheetTheme="App_Themes.Dark"/>
  • B、You should use the page directive: <%@ Page Theme="App_Themes.Dark"/>
  • C、You should use the page directive: <%@ Page Theme="Dark"/>
  • D、You should use the page directive: <%@ Page StyleSheetTheme="Dark"/>

正确答案:C

第7题:

Squeaky Beans Inc. hired an outside consultant to develop their web application. To finish the job quickly, the consultant created several dozen JSP pages that directly communicate with the database. The Squeaky business team has since purchased a set of business objects to model their system, and the Squeaky developer charged with maintaining the web application must now refactor all the JSPs to work with the new system.  Which pattern can the developer use to solve this problem?()

  • A、 Transfer Object
  • B、 Service Locator
  • C、 Intercepting Filter
  • D、 Business Delegate

正确答案:D

第8题:

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

第9题:

You are designing a Windows Azure application.  The application includes two web roles and three instances of a worker role.  The web roles will send requests to the worker role through one or more Windows Azure Queues. You have the following requirements:   - Ensure that each request is processed exactly one time.   - Minimize the idle time of each worker role instance. - Maximize the reliability of request processing.   You need to recommend a queue design for sending requests to the worker role.  What should you recommend?()

  • A、 Create a single queue.  Send requests on the single queue.
  • B、 Create a queue for each web role.  Send requests on all queues at the same time.
  • C、 Create a queue for each workerrole instance.  Send requests on each worker queue in a round robin.
  • D、 Create a queue for each combination of web roles and worker role instances.  Send requests to all worker role instances based on the sending web role.

正确答案:A

第10题:

A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet. Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()

  • A、Facade
  • B、View Helper
  • C、Transfer Object
  • D、Intercepting Filter
  • E、Composite Facade

正确答案:D

更多相关问题