In other words, if someMethod takes an argument of type
String, the TLD must use java.lang.String to declare it, as
follows:
...
void someMethod(java.lang.String)
...
Core Warning
The values of function-class and function-signature have to
contain fully qualified Java classes.
3. Declare tag library inside the JSP page. This step is identical to
declaring a TLD that contains declarations of custom tags exclusively.
Just like before you use the taglib directive, assign a prefix to be
used throughout the JSP page. For example:
<%@ taglib prefix="myfunc" uri="someURI" %>
4. Use JSP EL to invoke the method. The invocation of the method is
done in the following form:
${myfunc:run()}
The myfunc part is the prefix that comes from the taglib declaration
mentioned in Step 3. The run part comes from the name element
inside the function element declaration in the TLD. Note that the
function name used inside the JSP page does not have to be the same
as the method name inside the implementing class.
8.10 Example: Improved Debug Tag 407
8.10 Example: Improved Debug Tag
In Section 7.7 (Example: Debug Tag), we introduced a debug tag. To review, the
debug tag lets us output part of the JSP page designated as debugging information.
If one of the request parameters sent to the page is debug, the contents of the JSP
page containing the debugging information, which are surrounded by the debug tag,
are allowed to be output to the client.
Pages:
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453