You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Will Glass-Husain <wg...@gmail.com> on 2007/08/17 22:41:13 UTC

Re: absolute path for template file

Did you configure the FileResourceLoader with a path?  If so, you shouldn't.

I've never tried this with a UNC style path.  Does something simple like
"/abc.txt" work?  (should retrieve c:\abc.txt).

Also, you may get better support on the user list.  I'm responding to that
list.

WILL

On 8/17/07, rnon <ar...@yahoo.com> wrote:
>
>
> the code:
> Velocity.mergeTemplate("\\\\networkcomputer\\shared$\\template.vm",
> "UTF-8",
> context, sw);
> gives error:
> SEVERE: ResourceManager : unable to find resource in any resource loader.
>
>
> can someone gives me example of how to use absolute path?
> I'm using velocity 1.5 and I see there's update on
> FileResourceLoader  class
> that allow usage of absolute path, but I don't know how to use it...
>
> thank you for the help
>
> --
> View this message in context:
> http://www.nabble.com/absolute-path-for-template-file-tf4287074.html#a12203692
> Sent from the Velocity - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

Re: absolute path for template file

Posted by Will Glass-Husain <wg...@gmail.com>.
Configuring the FileResourceLoader won't help.  You could do to set a
relative path.  (see the Developer's Guide).

You must have something wrong with your path.  Can you access that path with
other Java programs?

WILL

On 8/17/07, rnon <ar...@yahoo.com> wrote:
>
>
> "/awrbc.txt" works fine
>
> I didn't do anything at all with FileResourceLoader ,
> how can I configure FileResourceLoader ? can someone post an example..
>
> thank you
>
>
> Will Glass-Husain-2 wrote:
> >
> > Did you configure the FileResourceLoader with a path?  If so, you
> > shouldn't.
> >
> > I've never tried this with a UNC style path.  Does something simple like
> > "/abc.txt" work?  (should retrieve c:\abc.txt).
> >
> > Also, you may get better support on the user list.  I'm responding to
> that
> > list.
> >
> > WILL
> >
> > On 8/17/07, rnon <ar...@yahoo.com> wrote:
> >>
> >>
> >> the code:
> >> Velocity.mergeTemplate("\\\\networkcomputer\\shared$\\template.vm",
> >> "UTF-8",
> >> context, sw);
> >> gives error:
> >> SEVERE: ResourceManager : unable to find resource in any resource
> loader.
> >>
> >>
> >> can someone gives me example of how to use absolute path?
> >> I'm using velocity 1.5 and I see there's update on
> >> FileResourceLoader  class
> >> that allow usage of absolute path, but I don't know how to use it...
> >>
> >> thank you for the help
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/absolute-path-for-template-file-tf4287074.html#a12203692
> >> Sent from the Velocity - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> >> For additional commands, e-mail: dev-help@velocity.apache.org
> >>
> >>
> >
> >
> > --
> > Forio Business Simulations
> >
> > Will Glass-Husain
> > wglass@forio.com
> > www.forio.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Re%3A-absolute-path-for-template-file-tf4288057.html#a12207394
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

Re: absolute path for template file

Posted by rnon <ar...@yahoo.com>.
"/abc.txt" works fine

I didn't do anything at all with FileResourceLoader , 
how can I configure FileResourceLoader ? can someone post an example..

thank you


Will Glass-Husain-2 wrote:
> 
> Did you configure the FileResourceLoader with a path?  If so, you
> shouldn't.
> 
> I've never tried this with a UNC style path.  Does something simple like
> "/abc.txt" work?  (should retrieve c:\abc.txt).
> 
> Also, you may get better support on the user list.  I'm responding to that
> list.
> 
> WILL
> 
> On 8/17/07, rnon <ar...@yahoo.com> wrote:
>>
>>
>> the code:
>> Velocity.mergeTemplate("\\\\networkcomputer\\shared$\\template.vm",
>> "UTF-8",
>> context, sw);
>> gives error:
>> SEVERE: ResourceManager : unable to find resource in any resource loader.
>>
>>
>> can someone gives me example of how to use absolute path?
>> I'm using velocity 1.5 and I see there's update on
>> FileResourceLoader  class
>> that allow usage of absolute path, but I don't know how to use it...
>>
>> thank you for the help
>>
>> --
>> View this message in context:
>> http://www.nabble.com/absolute-path-for-template-file-tf4287074.html#a12203692
>> Sent from the Velocity - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
>>
> 
> 
> -- 
> Forio Business Simulations
> 
> Will Glass-Husain
> wglass@forio.com
> www.forio.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-absolute-path-for-template-file-tf4288057.html#a12207394
Sent from the Velocity - User mailing list archive at Nabble.com.


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