SCWCD-20 05/13/2008
 

A JSP page can receive context initialization parameters through the deployment descriptor of the web application.

a True

b False

Answer: a

 
When writing a TLD, which tags would you use to surround fnName(int num), a Java method declared in a separate class?

a <function-signature></function-signature>

b <function-name></function-name>

c <method-class></method-class>

d <method-signature></method-signature>

e <function-class></function-class>

Answer: a

 
Which of the options locate the bean equivalent to the following action? (Select three)

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

a request.getAttribute("address");

b request.getParameter("address");

c getServletContext().getRequestAttribute("address");

d pageContext.getAttribute("address",PageContext.REQUEST_SCOPE);

e pageContext.getRequest().getAttribute("address");

f pageContext.getRequestAttribute("address");

g pageContext.getRequestParameter("address");

Answers: a, d, and e

 

You are given a tag library that has a tag named printReport. This tag may accept an attribute, department, which cannot take a dynamic value. Which of the following are correct uses of this tag? (Select two)

a <mylib:printReport/>

b <mylib:printReport department="finance"/>

c <mylib:printReport attribute="department" value="finance"/>

d <mylib:printReport attribute="department"

attribute-value="finance"/>

e <mylib:printReport>

<jsp:attribute name="department" value="finance" />

</mylib:printReport>

Answers: a and b

 

Which of the following methods is never called for handler classes that implement only the Tag interface? (Select one)

a setParent()

b doStartTag()

c doAfterbody()

d doEndTag()

Answer: c

   
Which of the following values is invalid inside a SimpleTag’s <bodycontent> subelement? (Select one)

a JSP

b scriptless

c tagdependent

d empty

Answer: a

 
You are designing an application that is required to display the data to users through HTML interfaces. It also has to feed the same data to other systems through XML as well as WAP interfaces. Which design pattern would be appropriate in this situation? (Select one)

a Interface Factory

b Session Facade

c Transfer Object

d Model-View-Controller

e Factory

Answer: d

 


Comments




Leave a Reply

    SCWCD Sets


    Archives

    May 2008
    April 2008