You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by George H <ge...@gmail.com> on 2008/06/18 16:45:40 UTC

What defines current dir in "file.resource.loader.path"

Hi,

When I set up my resource loader config file I can put (according to
the developer docs) "file.resource.loader.path = ."

My question is...  the current dir is where?

Thanks,
George

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


Re: What defines current dir in "file.resource.loader.path"

Posted by George H <ge...@gmail.com>.
On Thu, Jun 19, 2008 at 12:03 AM, Claude Brisson <cl...@renegat.net> wrote:
> Velocity is a library. The current directory depends upon the java
> program using it (tomcat for instance).
>
> Excerpt from java.io.File javadoc:
>
>        By default the classes in the java.io package always resolve
>        relative pathnames against the current user directory. This
>        directory is named by the system property user.dir, and is
>        typically the directory in which the Java virtual machine was
>        invoked.
>
> But you can use relative resource loading with #parse and #include by
> adding the following to your velocity.properties file:
>
> eventhandler.include.class = org.apache.velocity.app.event.implement.IncludeRelativePath
>
>
>  Claude

Thanks, I'll try these out.


> Le mercredi 18 juin 2008 à 17:45 +0300, George H a écrit :
>> Hi,
>>
>> When I set up my resource loader config file I can put (according to
>> the developer docs) "file.resource.loader.path = ."
>>
>> My question is...  the current dir is where?
>>
>> Thanks,
>> George
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Re: What defines current dir in "file.resource.loader.path"

Posted by Claude Brisson <cl...@renegat.net>.
Velocity is a library. The current directory depends upon the java
program using it (tomcat for instance).

Excerpt from java.io.File javadoc:

        By default the classes in the java.io package always resolve
        relative pathnames against the current user directory. This
        directory is named by the system property user.dir, and is
        typically the directory in which the Java virtual machine was
        invoked.

But you can use relative resource loading with #parse and #include by
adding the following to your velocity.properties file:

eventhandler.include.class = org.apache.velocity.app.event.implement.IncludeRelativePath


  Claude

Le mercredi 18 juin 2008 à 17:45 +0300, George H a écrit :
> Hi,
> 
> When I set up my resource loader config file I can put (according to
> the developer docs) "file.resource.loader.path = ."
> 
> My question is...  the current dir is where?
> 
> Thanks,
> George
> 
> ---------------------------------------------------------------------
> 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