I believe the default base is the servlet container's bin directory (ie., /tomcat/bin). See example2 for an example of how to reset velocity's base directory by overriding the loadConfiguration() method.
I recommend the Developer's Guide for a more complete explanation of how to set things up. It's all there. I have some notes to myself on setting up Velocity for a web application that may be useful in just seeing how someone does it for real. Use this only as another example, not the final word... http://www.utdallas.edu/~baughman/velocity.html Barbara Baughman X2157 On Fri, 26 Jul 2002, Sampath Kondam wrote: > I came accross the same problem before, It seems the velocity assumes its base >directory as the app/webserver's bin directory. > > > > >>> [EMAIL PROTECTED] 07/26/02 01:12AM >>> > My velocity why define the relative path to /web/server/resin. > > My server directory path like that: > /web/-->server/-->apache20 > -->resin > /web/-->site/-->bin > -->conf //the http.conf resin.conf > -->doc > -->logs > -->lib //the share lib > -->webapps > | > -->egroup > | > -->logs > -->templates > -->WEB-INF > | > -->build > -->conf //velocity.properties > -->lib //velocity.jar > -->classes > -->src > > Who can tell me why the 'current path'of velocity is > '/web/server/resin'.I have define the server root to /web/site in > resin.conf. > > And who can explain the path of velocity configuraiton. > > My velocity.properties > # > #This file override the default value of the velocity > # > > #********************* > #* RunTime Log * > #********************* > runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4jLogSystem > runtime.log = ../../site/logs/velocity.log > > #you cant set them to true when you debug the system > runtime.log.error.stacktrace = true > runtime.log.warn.stacktrace = true > runtime.log.info.stacktrace = true > > runtime.log.invalid.references = false > #content type > default.contentType=text/html > > #character > input.encoding = UTF-8 > output.encoding = UTF-8 > > #resource load > resource.loader = service > #you can modified the template path > service.loader.description = Velocity File Resource Loader > service.resource.loader.class = > org.apache.velocity.runtime.resource.loader.FileResourceLoader > service.resource.loader.path = ../../site/webapps/egroup/templates > service.resource.loader.cache = false > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>