The g:insert tag can be used to insert the Jelly code in a different file (UI page or macro) into your Jelly in a new context. When the Jelly code is inserted in a new context, the variables previously established in your Jelly are not available to the new code.
For example:
<j:setvar="jvar_message" value="Hello World!" /> <g:insert template="hello.xml" />
In the preceding example, the jvar_message variable will not be available to the included hello.xml template.