File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Head first question 14 page 431 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Head first question 14 page 431" Watch "Head first question 14 page 431" New topic
Author

Head first question 14 page 431

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 356
I dont understand the answer ??

package com.example;
public class MyFunctions {
public static String repeat(int x,String str) {
// methoed body
}
}

and given the jsp:
<%@ taglib uri="/WEB-INF/myfuncts" prefix="my" %>
<%insert code here --%>

a) ${repeat(2, "420")}
b) ${repeat("2", "420")}
c) ${my:repeat(2, "420")}
d) ${my:repeat("2", "420")}
e) A valid invocation CANNOT be determined.

I thought the answer was 2 & 3, becouse the we can�t se the function in the DD, and maybe they call the "name" in the DD "repeat" the same name as the methoed ???

The answar was E "Option E is correct, the nessesary mapping information is not known" ???

Can somebody tell me whats wrong ???

Frank
Wim van Haaren
Greenhorn

Joined: Nov 04, 2004
Posts: 18
The TLD is missing. And without the TLD the container cannot map the taglib in the JSP to the class MyFunctions.
[ November 10, 2004: Message edited by: Wim van Haaren ]
Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 356
Off course, thanks

Frank
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head first question 14 page 431