velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Novarini <a.novar...@sourcesense.com>
Subject Re: How to load a macro from file (again!!!)
Date Mon, 19 Jan 2009 11:23:53 GMT
Hello everybody, it's me again

After a lot of research I've found what I was looking for, but now  
there's another problem...

I can get an already inited VelocityEngine, now I have to add at  
runtime another velocimacro file; how can I do that? Is it possible?

Thank you in advance,
Ale

On Jan 7, 2009, at 11:33 AM, Alessandro Novarini wrote:

> Ok, I'll check also some JIRA ml, but I am quite sure you're right,  
> there is another VelocityEngine (not singleton) that's doing the  
> dirty job :|
>
> I think I need to get it someway, so I'm thinking to change my code
>
> Velocity.init(customVelocityFile);
> Velocity.getProperty(velocimacroLibrary);
>
> into
>
> VelocityEngine ve =  
> someClass.getCurrentVelocityEngineOrWhateverThisMethodHasBeenNamed();
> ve..getProperty(velocimacroLibrary);
>
>
> Any suggestion?
>
> Thanks again, you've been very helpful
> Ale
>
>
>
> On Jan 6, 2009, at 5:12 PM, Nathan Bubna wrote:
>
>> On Tue, Jan 6, 2009 at 1:04 AM, Alessandro Novarini
>> <a.novarini@sourcesense.com> wrote:
>>> Hello Nathan,
>>>
>>> On Mon, Jan 5, 2009 at 11:19 PM, Nathan Bubna <nbubna@gmail.com>  
>>> wrote:
>>>
>>>> Your properties look fine and the logs confirm that.
>>>
>>>
>>> Glad to read it, it means I'm not totally wrong
>>>
>>>
>>>> I can only guess
>>>> that whatever VelocityEngine or Velocity singleton that is  
>>>> processing
>>>> your template is not the same one that you are initializing.  What
>>>> code/servlet/whatever are you using to process templates?
>>>
>>>
>>> This is a good point; unfortunately I don't know the answer :(
>>> I'm using the singleton in my Action class, as I said, this is a  
>>> jira
>>> plugin, a sort of thing I'm not used to yet and worst of all  
>>> something out
>>> of my control...
>>> Can you give me an adivice where to search for what you asked?  
>>> Should there
>>> be a configuration file somewhere?
>>
>> I don't know anything about JIRA, so i'm totally guessing here:  you
>> could check the web.xml and see if there is a VelocityViewServlet in
>> sight.  You can also keep an eye out for any other  
>> velocity.properties
>> files, of course, then try editing that.
>>
>> if JIRA has a user list, they might have an answer to my question.
>>
>>> Thank you for your advices, I'll do further investigation
>>>
>>> Ale
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: user-help@velocity.apache.org
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message