Suppose you need to execute this JSP code:
Note: you have to use < instead of < and > instead of > in the string for JSP elements.
Tag AjaxEval can cache dynamic code. So if you are executing the same code several times
you can avoid recompilations. In order to use cache you have to provide an additional parameter
cacheDir. This parameter describes some existing directory in the file tree of your web application.
Note: you have to provide here a path to this directory relatively to your jsp files. E.g. if
you are using a subdirectory EVAL_CACHE within subdirectory DATA you can write so:
Tag AjaxEvalPage lets you evaluate JSP page described in the parameter src.
Body tag AjaxEvalBody lets you evaluate own body twice. Suppose your JSP code
(custom tags) outputs some JSP code (e.g. with scriptlets, tags etc.) rather than plain HTML.
In this case you need to evaluate (execute) this output again. That is what evalBody
tag is for. For example:
Tag AjaxEvalBody evalutes own body twice. The first pass is synchronous and generates some JSP code. This generated code will be executed asynchronoulsy via Ajax call.
Note: if your evaluated code contains some custom taglibs make sure this code includes the definitions for taglibs too. It is not enough here to define taglibs in the main file only.
Executes JSP code from the parameter. Parameter is:
1) code JSP code
2) cacheDir Optional parameter. Describes a directory for cache. By default is empty (tag does not use cache).
Executes JSP page. Parameters are:
1) src describes your JSP page
Body tag executes own body twice. Parameters are: none
© Coldbeans Software Comments?
See also Coldtags suite - the largest collection of custom JSP tags.