Title: RE: Multiple templates location/VelocityServlet instances

If what you are really asking is how to have a different velocity configuration for different web applications in the same servlet engine, just put velocity.jar in WEB-INF/lib for each app, and set the properties for each through the web.xml file for the servlet.

If not, if all servlets are running in one application context in the servlet container, you have to do something smarter yourself - like segment your templates into subdirectories, one for each servlet / application function, and either override the template path properties at run time, setting the real path from the servlet context if you want to deploy arbitrarily, or use an absolute path to the template root (of those subdirs...)

geir



    -----Original Message-----
    From:   Shahar Solomianik [SMTP:[EMAIL PROTECTED]]
    Sent:   Wednesday, January 17, 2001 3:19 PM
    To:     [EMAIL PROTECTED]
    Subject:        Multiple templates location/VelocityServlet instances

    Hi velocity list, its me again.

    Since currently im not deploying templates in EAR files ...
    I have several web contexts in my tomcat server, and I want each contexts
    templates to be loaded from a different path.
    what are my options ?

    I see that even though I supply different velocity.properties file for each
    context, each containing another setting for
    resource.loader.1.resource.path, only the first context to be run loads the
    prop file so it looks for templates only in one place (I guess the servlet
    checks to see if it has already loaded the file).

    So, in other words, How do I start more than one VelocityServlet on a
    servlet runner ?

    Shahar.

Reply via email to