Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ - CH-8 mock exam q-14

 
Swati Udas
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is
Given:
package com.example;
public class MyFunctions{
public static string repeat(int x,String str){
//method body
}
}
and given jsp :
<%@ taglib uri="/WEB-INF/myfuncts" prefix="my" %>
<%------ insert code here ---%>

choose valid EL
my ANswer is option C i.e ${my:repeat(2,"420")}
but the book answer says valid invocation cannot be determeined.!
Why is that so ??
Please help.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because we don't know the TLD ...
 
kalpana ram
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi swati,

The El function name that we use on JSP page comes from the name sub element of funtion element,which is in TLD file.

<function>
<name></name>
<fuction-class></function-class>
<function-signature></function-signature>
</function>

In this case the TLD file is not specified,hence function name cannot be determined.

regards
Kalpana.
 
Swati Udas
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok..makes sense..
thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic