Which two are true?

A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called
sort.jsp exists in the web application and contains only this JSP code:
1. <%@ taglib prefix=”x”
2. tagdir=”/WEB-INF/tags/alpha” %>
3. <x:beta />
The sort.jsp page is requested.
Which two are true? (Choose two.)

A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called
sort.jsp exists in the web application and contains only this JSP code:
1. <%@ taglib prefix=”x”
2. tagdir=”/WEB-INF/tags/alpha” %>
3. <x:beta />
The sort.jsp page is requested.
Which two are true? (Choose two.)

A.
Tag files can only be accessed using a tagdir attribute.

B.
The sort.jsp page translates successfully and invokes the tag defined by beta.tag.

C.
The sort.jsp page produces a translation error because a taglib directive must always have a uri
attribute.

D.
Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEBINF/tags.

E.
The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is
created and added to the web application.

F.
The sort.jsp page produces a translation error because the tagdir attribute on lines 1-2 specifies
a directory other than /WEB-INF/tags, which is illegal.

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *