editada*******
Olá,
Configurei a minha aplicação velocity e fiz os templates, só que quando dou o merge o arquivo gerado não vem com as variáveis que setei no contexto.
o arquivo fica mais ou menos assim
package ${pacote.struts}${pacote.struts.action};
import java.util.Collection;
import java.util.LinkedList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import ${pacote.componente}.${classe.fachada};
import ${pacote.componente}.${classe.fabrica};
import ${pacote.componente}${pacote.componente.exceptions}.${classe.exception};
import ${pacote.componente}${pacote.componente.objnegocio}.${classe.objnegocio};
import ${pacote.struts}${pacote.struts.form}.${classe.form};
import br.com.facilit.utils.pagebypage.Pager;
e no log vem a seguinte mesagem
Thu Sep 25 15:05:09 BRT 2003 [debug] AvalonLogSystem initialized using logfile C:Projetoseasygeneratorwebvelocity.log
Thu Sep 25 15:05:09 BRT 2003 [info] Jakarta Velocity v1.2
Thu Sep 25 15:05:09 BRT 2003 [info] RuntimeInstance initializing.
Thu Sep 25 15:05:09 BRT 2003 [info] Default Properties File: orgapachevelocity
untimedefaultsvelocity.properties
Thu Sep 25 15:05:09 BRT 2003 [info] Resource manager initializing.
Thu Sep 25 15:05:09 BRT 2003 [info] Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Sep 25 15:05:09 BRT 2003 [info] FileResourceLoader : initialization starting.
Thu Sep 25 15:05:09 BRT 2003 [info] FileResourceLoader : adding path 'C:Projetoseasygeneratorweb emplates'
Thu Sep 25 15:05:09 BRT 2003 [info] FileResourceLoader : adding path 'C:Projetoseasygeneratorwebsrcrcomfaciliteasygeneratorwebutilpropriedadesvelocity'
Thu Sep 25 15:05:09 BRT 2003 [info] FileResourceLoader : initialization complete.
Thu Sep 25 15:05:09 BRT 2003 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Literal
Thu Sep 25 15:05:09 BRT 2003 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Macro
Thu Sep 25 15:05:09 BRT 2003 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Parse
Thu Sep 25 15:05:09 BRT 2003 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Include
Thu Sep 25 15:05:09 BRT 2003 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Foreach
Thu Sep 25 15:05:09 BRT 2003 [info] Created: 20 parsers.
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : initialization starting.
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : adding VMs from VM library template : VM_global_library.vm
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : added new VM : #quietnull( a ) : source = VM_global_library.vm
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : added new VM : #recurse( a ) : source = VM_global_library.vm
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : added new VM : #callrecurse( ) : source = VM_global_library.vm
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : added new VM : #testbool( b ) : source = VM_global_library.vm
Thu Sep 25 15:05:09 BRT 2003 [error] VM #recurse: error : too few arguments to macro. Wanted 1 got 0 -->
Thu Sep 25 15:05:09 BRT 2003 [info] ResourceManager : found VM_global_library.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : VM library template macro registration complete.
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : allowInline = true : VMs can be defined inline in templates
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : allowInlineToOverride = true : VMs defined inline may replace previous VM definitions
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : allowInlineLocal = true : VMs defined inline will be local to their defining template only.
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : messages on : VM system will output logging messages
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : autoload off : VM system will not automatically reload global library macros
Thu Sep 25 15:05:09 BRT 2003 [info] Velocimacro : initialization complete.
Thu Sep 25 15:05:09 BRT 2003 [info] Velocity successfully started.
Thu Sep 25 15:05:09 BRT 2003 [info] ResourceManager : found ManterAction_java.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 1,column 9] : ${pacote.struts} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 1,column 25] : ${pacote.struts.action} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 15,column 8] : ${pacote.componente} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 15,column 29] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 16,column 8] : ${pacote.componente} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 16,column 29] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 17,column 8] : ${pacote.componente} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 17,column 28] : ${pacote.componente.exceptions} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 17,column 60] : ${classe.exception} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 18,column 8] : ${pacote.componente} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 18,column 28] : ${pacote.componente.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 18,column 60] : ${classe.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 20,column 8] : ${pacote.struts} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 20,column 24] : ${pacote.struts.form} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 20,column 46] : ${classe.form} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 27,column 15] : ${classe.action.manter} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 29,column 38] : ${classe.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 42,column 5] : ${classe.form} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 42,column 34] : ${classe.form} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 45,column 5] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 45,column 33] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 50,column 5] : ${classe.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 50,column 40] : ${classe.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 50,column 77] : ${classe.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 61,column 5] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 61,column 33] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 71,column 38] : ${classe.objnegocio} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 79,column 16] : ${classe.exception} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 80,column 49] : ${struts.forward.erro} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 84,column 49] : ${struts.forward.erro} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 107,column 5] : ${classe.form} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 107,column 34] : ${classe.form} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 110,column 5] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 110,column 33] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 114,column 5] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 114,column 33] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 142,column 50] : ${struts.modulo} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 142,column 66] : ${struts.action.path} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 151,column 14] : ${classe.exception} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 152,column 41] : ${struts.forward.erro} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 156,column 41] : ${struts.forward.erro} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 183,column 5] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 183,column 33] : ${classe.fabrica} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 186,column 5] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 186,column 33] : ${classe.fachada} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 207,column 14] : ${classe.exception} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 208,column 41] : ${struts.forward.erro} is not a valid reference.
Thu Sep 25 15:05:09 BRT 2003 [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ManterAction_java.vm [line 212,column 41] : ${struts.forward.erro} is not a valid reference.
Alguém sabe o que porque o velocity não reconhece as variáveis???[/code]