开发者

how to load velocity template dynamically through properties file

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开发者_Go百科 time of loading application what to do?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜