botn ora

Greenhorn
+ Follow
since Jan 13, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by botn ora

Hi Jerry,

Given four JSP files arranged in the following directory hierarchy, identify the correct action that should be defined in acme/detonate.jsp to display 'click' when coyote.jsp is requested.

coyote.jsp
dynamite.jsp
acme/detonate.jsp
acme/dynamite.jsp
coyote.jsp contains <%@ include file="acme/detonate.jsp %>
dynamite.jsp contains boom!!!
acme/dynamite.jsp contains click

Possible answers:

1 <jsp:include page="dynamite.jsp"/>
2 <jsp:include page="acme/dynamite.jsp"/>
3 <jsp:include page="../dynamite.jsp"/>
4 <jsp:include file="dynamite.jsp" />


<%@include will include the code statically. We need to write something in acme/detonate.jsp. But, the code of this file is now the part of coyate.jsp directly. So, the line <jsp:include page="acme/dynamite.jsp" /> is the part of coyate.jsp not acme/detonate.jsp. Now, it is easy to see from coyate.jsp that it should be the choice 2.



Thanks.