views:

18

answers:

1

I am using velocity templates as view component,and my welcome file is also a .vm file.Here I am facing the problem,when ever I run my application that .vm file is not rendered by the velocity engine.So to render that .vm files at the time of loading application what to do?

A: 

The issue is most likely related to your webapp, not Velocity.

A webapp in Tomcat will ignore any servlet mapping in a tag. This is fixed in Tomcat 7. (I believe it's actually a problem with the Servlet spec).

See: https://issues.apache.org/bugzilla/show_bug.cgi?id=47378

More useful info here: http://wiki.metawerx.net/wiki/HowToUseAServletAsYourMainWebPage

Bottom line - To make this work, put a file 'index.jsp' in the root of your webapp which forwards to your true welcome file.

Will Glass