You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jason Pettiss <ja...@TheCatalis.com> on 2005/10/09 20:44:43 UTC
Re: basic velocity property file question
If you're doing it all by yourself:
Velocity.init("your_velocity.properties")
And then in your_velocity.properties put something like:
runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
file.resource.loader.path=.
And then tweak everything so the paths are right for how you're starting
Tomcat. But if you're using it to serve content-- go get the
VelocityViewServlet and then as an init param in your web.xml you can
specify the location of velocity.properties, and then I think you can
leave off the resource loader path because it'll configure it to the
right place automatically.
<init-param>
<param-name>org.apache.velocity.properties</param-name>
<param-value>/WEB-INF/velocity.properties</param-value>
</init-param>
--jason
Manisha Sathe wrote:
>I am new to velocity. I know that i can make use of my
>own velocity.property file where i can change the log
>file directory/name and can make use of log4j. Also
>can specify the default vm path.
>
>I am on Tomcat, I want to put it under /WEB-INF.
>Currently using like below inside my code:
>
>Velocity.setProperty(
>RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
>
>"org.apache.velocity.runtime.log.SimpleLog4JLogSystem"
>);
>Velocity.setProperty("file.resource.loader.path",vmpath);
>//vmpath - my default path
>
>
>I want to define all this inside property file and use
>that, but exactly how ? i am bit confused.
>
>Thanks in advance,
>
>Manisha
>
>
>
>__________________________________
>Yahoo! Music Unlimited
>Access over 1 million songs. Try it free.
>http://music.yahoo.com/unlimited/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: basic velocity property file question
Posted by Manisha Sathe <ma...@yahoo.com>.
Thanks Jason, will try it out that,
regards
Manisha
--- Jason Pettiss <ja...@TheCatalis.com>
wrote:
> If you're doing it all by yourself:
>
> Velocity.init("your_velocity.properties")
>
> And then in your_velocity.properties put something
> like:
>
>
runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
> file.resource.loader.path=.
>
> And then tweak everything so the paths are right for
> how you're starting
> Tomcat. But if you're using it to serve content--
> go get the
> VelocityViewServlet and then as an init param in
> your web.xml you can
> specify the location of velocity.properties, and
> then I think you can
> leave off the resource loader path because it'll
> configure it to the
> right place automatically.
>
> <init-param>
>
>
<param-name>org.apache.velocity.properties</param-name>
>
>
<param-value>/WEB-INF/velocity.properties</param-value>
> </init-param>
>
>
> --jason
>
> Manisha Sathe wrote:
>
> >I am new to velocity. I know that i can make use of
> my
> >own velocity.property file where i can change the
> log
> >file directory/name and can make use of log4j. Also
> >can specify the default vm path.
> >
> >I am on Tomcat, I want to put it under /WEB-INF.
> >Currently using like below inside my code:
> >
> >Velocity.setProperty(
> >RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
> >
>
>"org.apache.velocity.runtime.log.SimpleLog4JLogSystem"
> >);
>
>Velocity.setProperty("file.resource.loader.path",vmpath);
> >//vmpath - my default path
> >
> >
> >I want to define all this inside property file and
> use
> >that, but exactly how ? i am bit confused.
> >
> >Thanks in advance,
> >
> >Manisha
> >
> >
> >
> >__________________________________
> >Yahoo! Music Unlimited
> >Access over 1 million songs. Try it free.
> >http://music.yahoo.com/unlimited/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> velocity-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> velocity-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> velocity-user-help@jakarta.apache.org
>
>
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org