Custom JSP tag helps you integrate JSP and JavaScript. Body tag jsvar lets you wrap own body into JavaScript function. So you will be able to use the content generated in your JSP fragment right from JavaScript (e.g. in your Ajax application). For example:
<%@ taglib uri="taglib.tld" prefix="j" %> <j:jsvar name="f"> <p> now it is in JavaScript </p> </j:jsvar> and after that you can use function f() in your JavaScript code. This function will simply return the text, presented in tag's body. Tags are: jsvar Body tag wraps own body into JavaScript function. Parameters are: 1) name Describes a name for your JavaScript
function
for downloading: Library: jsvartag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|