The Squeaky Bean company has decided to port their web application to a new J2EE 1.4 container. Whilereviewing the application, a developer realizes that in multiple places within the current application, nearlyduplicate code exists that finds enterprise beans.
Which pattern should be used to eliminate this duplicatecode?()
A.Transfer Object
B.Front Controller
C.Service Locator
D.Intercepting Filter
E.Business Delegate
F.Model-View-Controller
您可能感興趣的試卷
你可能感興趣的試題
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
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 Squeakybusiness 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 newsystem.
Which pattern can the developer use to solve this problem?()
A.Transfer Object
B.Service Locator
C.Intercepting Filter
D.Business Delegate
Click the Exhibit button.
The Appliance class is a Singleton that loads a set of properties into a Map from an external data source.Assume:
An instance of the Appliance class exists in the application-scoped attribute, appl The appliance object includes the name property that maps to the value Cobia The request- scoped attribute, prop,has the valuename.
Which two EL code snippets will display the string Cobia?()
A.${appl.properties.name}
B.${appl.properties.prop}
C.${appl.properties[prop]}
D.${appl.properties[name]}
E.${appl.getProperties().get(prop)}
F.${appl.getProperties().get(’name’)}
A.${func(1)}
B.${foo:func(4)}
C.${func:foo(2)}
D.${foo(5):func}
E.${func:foo("easy")}
F.${func:foo("3").name}
You have created a web application that you license to real estate brokers. The webapp is highly customizable including the email address of the broker, which is placed on the footer of each page. This isconfigured as a context parameter in the deployment descriptor:
10.<context-param>
11.<param-name>footerEmail</param-name>
12.<param-value>joe@estates-r-us.biz</param-value>
13.</context-param>
Which EL code snippet will insert this context parameter into the footer?()
A.<a href=’mailto:${footerEmail}’>Contact me</a>
B.<a href=’mailto:${initParam@footerEmail}’>Contact me</a>
C.<a href=’mailto:${initParam.footerEmail}’>Contact me</a>
D.<a href=’mailto:${contextParam@footerEmail}’>Contact me</a>
E.<a href=’mailto:${contextParam.footerEmail}’>Contact me</a>
最新試題
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 <title> tag that requires the page name tobe specified dynamically when the header is imported.Which JSP code snippet performs the import of theheader content?()
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?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Click the ’Select and Place’ button.Place the events in the order they occur.
Which element of a web application deployment descriptor element is required?()
Click the ’Select and Place’ button.Place the events in the order they occur.
You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side.Which JSP code snippet will create this array?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Which two are valid and equivalent?()
The JSP developer wants a comment to be visible in the final output to the browser.Which comment styleneeds to be used in a JSP page?()