Which tags tell the web container where to find your TLD file in your filesystem?

a <taglib-directory></taglib-directory>

b <taglib-uri></taglib-uri>

c <taglib-location></taglib-location>

d <tld-directory></tld-directory>

e <taglib-name></taglib-name>

Answer: c

Which of the following gets or sets the bean in the ServletContext container object? (Select one)

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

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

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

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

e None of the above.

Answer: b


Which of the following is a valid taglib directive? (Select one)

a <%@ taglib prefix="java" uri="sunlib"%>

b <%@ taglib prefix="jspx" uri="sunlib"%>

c <%@ taglib prefix="jsp" uri="sunlib"%>

d <%@ taglib prefix="servlet" uri="sunlib"%>

e <%@ taglib prefix="sunw" uri="sunlib"%>

f <%@ taglib prefix="suned" uri="sunlib"%>

Answer: f

Which of the following interfaces are required at a minimum to create a simple custom tag with a body? (Select one)

a Tag

b Tag and IterationTag

c Tag, IterationTag, and BodyTag

d TagSupport

e BodyTagSupport

Answer: a

If placed inside the body of a custom tag, which of the following statements won’t produce “9”? (Select one)

a ${3 + 3 + 3}

b "9"

c <c:out value="9">

d <%= 27/3 %>

Answer: d


Which of the following statements are correct? (Select two)

a The Transfer Object pattern ensures that the data is not stale at the time of use.

b It is wise to make the Transfer Object immutable if the Transfer Object represents

read-only data.

c Applying the Transfer Object pattern on EJBs helps to reduce the load on enterprise


d A Transfer Object exists only on the server side.

Answers: b and c

You need to send a GIF file to the browser. Which of the following lines should be called after (or before) a call to response.getOutputStream()? (Select one)

a response.setContentType("image/gif"); Before

b response.setContentType("image/gif"); After

c response.setDataType("image/gif"); Before

d response.setDataType("image/gif"); After

e response.setStreamType("image/gif"); Before

f response.setStreamType("image/gif"); After

Answer: a



Leave a Reply

    SCWCD Sets


    May 2008
    April 2008