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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]