SCWCD-18 05/13/2008
 

Which two of the following expressions won’t return the header’s accept field?

a ${header.accept}

b ${header[accept]}

c ${header['accept']}

d ${header["accept"]}

e ${header.'accept'}

Answers: b and e

 

Consider the following code:
<html>
<body>

<jsp:useBean id="address" class="AddressBean" scope="session" />

state = <jsp:getProperty name="address" property="state" />
 </body>
</html>

Which of the following are equivalent to the third line above? (Select three)

a <% state = address.getState(); %>

b <% out.write("state = "); out.print(address.getState()); %>

c <% out.write("state = "); out.print(address.getstate()); %>

d <% out.print("state = " + address.getState()); %>

e state = <%= address.getState() %>

f state = <%! address.getState(); %>

Answers: b, d, and e

   
Consider the following <taglib> element, which appears in a deployment descriptor of a web application:
<taglib>

<taglib-uri>/accounting</taglib-uri>
 <taglib-location>/WEB-INF/tlds/SmartAccount.tld</taglib-location>
 </taglib>
Which of the following correctly specifies the use of the above tag library in a JSP page? (Select one)

a <%@ taglib uri="/accounting" prefix="acc"%>

b <%@ taglib uri="/acc" prefix="/accounting"%>

c <%@ taglib name="/accounting" prefix="acc"%>

d <%@ taglib library="/accounting" prefix="acc"%>

e <%@ taglib name="/acc" prefix="/accounting"%>

Answer: a

 
At a minimum, which of the following interfaces are required to create an iterative custom tag? (Select one)

a Tag

b Tag and IterationTag

c Tag, IterationTag, and BodyTag

d TagSupport

e BodyTagSupport

Answer: b

 

Which of the following methods need to be invoked in a SimpleTag to provide iterative processing? (Select one)

a setDynamicAttribute()

b getParent()

c getJspBody()

d doTag()

e getJspContext()

Answer: d


   

What are the benefits of using the Business Delegate pattern? (Select three)

a It implements the business service functionality locally to improve performance.

b It shields the clients from the details of the access mechanism, such as CORBA or

RMI, of the business services.

c It shields the clients from changes in the implementation of the business services.

d It provides the clients with a uniform interface to the business services.

e It reduces the number of remote calls and reduces network overhead.

Answers: b, c, and d

 


Comments




Leave a Reply

    SCWCD Sets


    Archives

    May 2008
    April 2008