Use ContextData annotation

User @ContextData to change variable name.
value
User @ContextData to specific query scope.
yyy
User convenient @QueryParam instead of @ContextData.
yyy
/templates/contextdata.html
<article>
	<dl>
		<dt>User @ContextData to change variable name.</dt>
		<dd var="value" afd:render="ComplicatedSnippet:changeName">changeName</dd>
		<dt>User @ContextData to specific query scope.</dt>
		<dd var="value" afd:render="ComplicatedSnippet:specificScope">specificScope</dd>
		<dt>User convenient @QueryParam instead of @ContextData.</dt>
		<dd var="value" afd:render="ComplicatedSnippet:convenientAnnotation">convenient</dd>
	</dl>
</article>
/snippet/ComplicatedSnippet.java
public Renderer changeName(@ContextData(name = "var") String changedName) {
    return Renderer.create("dd", changedName);
}

public Renderer specificScope(@ContextData(scope = WebApplicationContext.SCOPE_QUERYPARAM) String var) {
    return Renderer.create("dd", var == null ? "" : var);
}

public Renderer convenientAnnotation(@QueryParam String var) {
    return Renderer.create("dd", var == null ? "" : var);
}