• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Head first question 14 page 431

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Off course, thanks

Frank
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic