You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by TheLam <la...@terminalc.com> on 2002/03/14 04:36:44 UTC

please help me soon!!!

Dear Sir / Madam
    
    My name is Lam. I live in HCMC. I am a student
    I am researching on Velocity, but I have many problems
 1   I really need more detailed help. I really don't understand about *velocity.property* in app_examples1.
 2   How can I set up a path for Velocity example * p.setProperty( Velocity.FILE_RESOURCE_LOADER_PATH,  path )*
 3 When you use * AddressBook addressBook = new AddressBook("simple");
                            addressBook.setPath("C:\\Documents and Settings\\Administrator");* 
        Please tell me what purpose ? I can reject it I mean I can not use it in my classes
4 Is there anything about the relationship between Velocity application and Servlet application

    Could you please help me and explain clearly as soon as . Please give me more simple examples about Velocity.
    I am looking forward to hearing from you  at your convenience.

 Best Regards

Nguyen The Lam
   
    

Re: please help me soon!!!

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 3/13/02 10:36 PM, "TheLam" <la...@terminalc.com> wrote:

> Dear Sir / Madam
>   
>   My name is Lam. I live in HCMC. I am a student
>   I am researching on Velocity, but I have many problems
> 1   I really need more detailed help. I really don't understand about
> *velocity.property* in app_examples1.

For that example, that is a file from which properties are read.  The would
be of the form

 file.resource.loader.path = /tmp

If you had your templates in the /tmp directory

The users guide and developers guide on the velocity site have a complete
description of the properties.

> 2   How can I set up a path for Velocity example * p.setProperty(
> Velocity.FILE_RESOURCE_LOADER_PATH,  path )*

 file.resource.loader.path = <your path>

In that file.  Or you can just do it in code, as you show above.

> 3 When you use * AddressBook addressBook = new AddressBook("simple");
>                           addressBook.setPath("C:\\Documents and
> Settings\\Administrator");*

What is the AddressBook?

>       Please tell me what purpose ? I can reject it I mean I can not use it in
> my classes

You can use your classes with Velocity, and use Velocity in your classes.
The App example shows how to use the velocity engine in normal java
applications, and the servlet examples show how it works in the servlet
environment.

> 4 Is there anything about the relationship between Velocity application and
> Servlet application

The only relationship is that Velocity does the rendering of the templates.
Otherwise, Velocity itself knows nothing about servlets (other than the
VelocityServlet class provided for convenience)
 
>   Could you please help me and explain clearly as soon as . Please give me
> more simple examples about Velocity.
>   I am looking forward to hearing from you  at your convenience.


The best thing to do, if you are having specific problems, is to post a
clear explanation of the problem you are having, and a short bit of code
that shows how you are trying to solve it.

geir

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
The question is : What is a Mahnamahna?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>