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>
Given:
1.<% int[] nums = {42,420,4200};
2.request.setAttribute("foo", nums); %>
3.${5 + 3 lt 6}
4.${requestScope[’foo’][0] ne 10 div 0}
5. ${10 div 0}
What is the result?()
A.True true
B.False true
C.False true 0
D.True true Infinity
E.False true Infinity
A.${requestURI}
B.${request.URI}
C.${request.getURI}
D.${request.requestURI}
E.${requestScope.requestURI}
F.${pageContext.request.requestURI}
最新試題
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.
Given a web application in which the request parameter productID contains a product identifier.Which twoEL expressions evaluate the value of the productID?()
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.
Given a Filter class definition with this method:21.public void doFilter(ServletRequest request,22.ServletResponse response,23.FilterChain chain)24.throws ServletException, IOException {25.// insert code here26.}Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
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?()
You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies:20.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()
Click the ’Select and Place’ button.Place the events in the order they occur.