Results 1 to 2 of 2
- 03-18-2011, 05:04 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 1
- Rep Power
- 0
What is the path of .vm in servlet ( Apache Velocity)
Hi All,
I have a servlet
Class testServlet extends HttpServlet
{
}
I am using apache velocity to generate some text.
But the path of .vm is not recognized
VelocityEngine ve=new Velocity();
Template template =ve.getTemplate("test.vm");
Where should i place the .vm file.
Any help is highly appreciated!!!!!
Thanks.
- 12-29-2011, 08:36 PM #2
Member
- Join Date
- Dec 2011
- Posts
- 3
- Rep Power
- 0
Re: What is the path of .vm in servlet ( Apache Velocity)
Not for sure but if you run the following: System.getProperty("user.dir");
it will give you a directory. Place the file in there and Velocity.getTemplate("index.vm"); will pick up the file in that directory. Its a work around for now as i am too looking for a way to place the .vm file within my package and have the program to get it.
Similar Threads
-
Apache 1.3 Servlet not found
By teckygamer in forum Java ServletReplies: 1Last Post: 09-06-2010, 02:16 AM -
Spring, XMLBeans, Apache Velocity
By emranrao in forum Advanced JavaReplies: 0Last Post: 05-31-2010, 04:59 PM -
org.apache.velocity.exception.ResourceNotFoundExce ption:
By LovJava in forum Web FrameworksReplies: 1Last Post: 01-28-2010, 04:45 PM -
Apache Velocity template file and output locations
By mjwoodford in forum New To JavaReplies: 1Last Post: 10-05-2009, 03:59 PM -
Servlet - apache tomcat/glassfish server shuts down on servlet usage
By StewS in forum Java ServletReplies: 1Last Post: 12-02-2008, 12:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks