You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Soriano, Jaume" <JS...@es.wanadoo.com> on 2001/09/11 10:27:55 UTC

Templates from an URL...is possible?

I mean, instead of writing:
Velocity.mergeTemplate("paises.vm",ctx,somethingHTML);

...something like:
Velocity.mergeTemplate("http://anothermachine/templates/paises.vm",ctx,smthi
ng);

Is possible to do that?

Thank you very much!

========<js...@es.wanadoo.com>=========

RE: Templates from an URL...is possible?

Posted by Paulo Gaspar <pa...@krankikom.de>.
It also looks like a question for the user list, but you should
take a look at how the Resource Loaders work. I think you need
to build a resource loader that supports HTTP.

Take a look at the stuff in the packages:
  org.apache.velocity.runtime.resource
  org.apache.velocity.runtime.resource.loader

Try also searching for "Resource", "Resource Loader" and 
"Resource Manager" in the documentation.


Have fun,
Paulo Gaspar

> -----Original Message-----
> From: Soriano, Jaume [mailto:JSoriano@es.wanadoo.com]
> Sent: Tuesday, September 11, 2001 10:28 AM
> To: velocity-dev@jakarta.apache.org
> Subject: Templates from an URL...is possible?
> 
> 
> I mean, instead of writing:
> Velocity.mergeTemplate("paises.vm",ctx,somethingHTML);
> 
> ...something like:
> Velocity.mergeTemplate("http://anothermachine/templates/paises.vm"
> ,ctx,smthi
> ng);
> 
> Is possible to do that?
> 
> Thank you very much!
> 
> ========<js...@es.wanadoo.com>=========
> 

RE: Templates from an URL...is possible?

Posted by Paulo Gaspar <pa...@krankikom.de>.
It also looks like a question for the user list, but you should
take a look at how the Resource Loaders work. I think you need
to build a resource loader that supports HTTP.

Take a look at the stuff in the packages:
  org.apache.velocity.runtime.resource
  org.apache.velocity.runtime.resource.loader

Try also searching for "Resource", "Resource Loader" and 
"Resource Manager" in the documentation.


Have fun,
Paulo Gaspar

> -----Original Message-----
> From: Soriano, Jaume [mailto:JSoriano@es.wanadoo.com]
> Sent: Tuesday, September 11, 2001 10:28 AM
> To: velocity-dev@jakarta.apache.org
> Subject: Templates from an URL...is possible?
> 
> 
> I mean, instead of writing:
> Velocity.mergeTemplate("paises.vm",ctx,somethingHTML);
> 
> ...something like:
> Velocity.mergeTemplate("http://anothermachine/templates/paises.vm"
> ,ctx,smthi
> ng);
> 
> Is possible to do that?
> 
> Thank you very much!
> 
> ========<js...@es.wanadoo.com>=========
>