RE: Setting-up global velocimacro with different name
"Artem Orlov" <[email protected]> Wed, 5 May 2004 18:12:03 +0500
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Anthony, > > And one more question here: I want to locate all my templates in > > "templates" folder, so want my global template setting be something as > > "template::/library.vm" and I can't do it using current code, isn't it? > > Is it possible to use /DefaultTemplateManager/ class at the > > initialization stage? > > The templates folder is really for design templates, not Velocity macro > libraries. You might be able to set up a repository which is mapped to > the templates directory as well so that you could then do: > > repository:templates:/library.vm > > I'm not exactly sure what you are trying to do, but perhaps this will > get you going in the right direction. Unfortunately it does not help. There are few strings from velocity log: --- Wed May 05 17:45:49 GEST 2004 [info] Created: 20 parsers. Wed May 05 17:45:49 GEST 2004 [info] Velocimacro : initialization starting. Wed May 05 17:45:49 GEST 2004 [info] Velocimacro : adding VMs from VM library template : repository:templates:/macro/library.html Wed May 05 17:45:49 GEST 2004 [error] ResourceManager : unable to find resource 'repository:templates:/macro/library.html' in any resource loader. Wed May 05 17:45:49 GEST 2004 [info] Velocimacro : error using VM library template repository:templates:/macro/library.html : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'repository:templates:/macro/library.html' Wed May 05 17:45:49 GEST 2004 [info] Velocimacro : VM library template macro registration complete. Wed May 05 17:45:49 GEST 2004 [info] Velocimacro : allowInline = true : VMs can be defined inline in templates --- So I guess that DefaultTemplateManager or file repository cannot work properly at the initialization stage. With good wishes, Artem Orlov ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click