The straightforward way is to define a VelocityViewServlet in web.xml
<servlet>
<servlet-name>view</servlet-name>
<servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
<init-param>
<param-name>org.apache.velocity.properties</param-name>
<param-value>/WEB-INF/velocity.properties</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>view</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
In velocity.properties
#resource loaders
resource.loader = production
production.resource.loader.class = org.apache.velocity.tools.view.WebappResourceLoader
Then put your template at the root of your webapp and access it from the web browser using its name as the URL. e.g.
http://localhost:8080/index.vm