Home > Unable To > Unable To Find Resource 'error.vm' In Any Resource Loader

Unable To Find Resource 'error.vm' In Any Resource Loader

Contents

This is al i have in my code: public Template handleRequest( HttpServletRequest request, HttpServletResponse response, Context context ) { Properties p = new Properties(); p.setProperty( "resource.loader", "class" ); p.setProperty( "class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader" Henry Versemann Greenhorn Posts: 6 posted 6 years ago I'm currently trying to work my way through the simple velocity tutorial at http://www.javaranch.com/journal/2004/03/Velocity-AnIntroduction.html and cannot get velocity to see the "hello.vm" This is the way that Velocity provides for loading templates from arbitrary sources. But is that any different than putting them in a subfolder of WEB-INF/classes in an exploded format? have a peek at this web-site

For this, you'd be better off using the VelocityViewServlet that's specifically designed for this kind of usage. After I thought more about it, I thought it might have been a classpath issue, and that the container just couldn't see the templates. If it's in WEB-INF/classes, you don't need the prefix. –duffymo Oct 16 '10 at 16:47 Great, this worked, I am curious, is this an alright method of doing this(keeping Unformatted code and configuration is unnecessarily difficult to read. http://stackoverflow.com/questions/9051413/unable-to-find-velocity-template-resources

Unable To Find Resource 'error.vm' In Any Resource Loader

You can also check my post about this: Spring-mvc + Velocity + DCEVM share|improve this answer edited Sep 5 '12 at 15:03 reevesy 2,89611722 answered Feb 2 '12 at 18:28 Rafael Why did my credit score plummet in a week? It should be part of the classpath which you can easily achieve in Eclipse with a 'new > Source Folder'.

  • Note: Making an answer instead of a comment due to privileges.
  • Work like a charm..!

    classpath:com/test/mail

    You can give what every your resource location(i.e, should be in your class path) between ... block.
  • Is it possible to change airports when using China's on-arrival transit visa scheme?
  • So I moved them in as resources into a velocity subfolder of my resources directory.
  • See Velocity documentation for help selecting and configuring a resource loader: http://velocity.apache.org/engine/releases/velocity-1.7/developer-guide.html#resourceloaders share|improve this answer answered Feb 14 '12 at 9:40 wau 540318 add a comment| up vote 2 down vote
  • What are the considerations for waterproofing a building's first few floors?
  • What is a real-world metaphor for irrational numbers?
  • ResourceManager : unable to find resource 'emailTemplate.vm' in any resource loader.
  • Feb 3, 2010 7:12:58 PM org.springframework.ui.velocity.CommonsLoggingLogSystem logVelocityMessage INFO: ClasspathResourceLoader : initialization complete.
  • Theorems demoted back to conjectures Output the sign Is there a non-medical name for the curve where index finger and thumb meet?

Why is the movie called "Dirty Dancing"? share|improve this answer answered Jul 24 '14 at 18:44 Serge Ballesta 46.7k43275 Thank You Serge Ballesta.... Whenever I hit my webservice, I see the following in the Catalina.out: Code: Feb 3, 2010 7:13:04 PM org.springframework.ui.velocity.CommonsLoggingLogSystem logVelocityMessage SEVERE: ResourceManager : unable to find resource 'WEB-INF/velocity/test-template.vm.vm' in any resource Resourcemanager Unable To Find Resource C# Bought agency bond (FANNIE MAE 0% 04/08/2027), now what?

Validate Random Die Tippers Why did my credit score plummet in a week? Velocity Resource Loader What evidence do we have that CMB is the result of the Big bang? java spring velocity share|improve this question asked Oct 16 '10 at 15:54 TheJediCowboy 2,1051675131 add a comment| 4 Answers 4 active oldest votes up vote 9 down vote accepted I think http://stackoverflow.com/questions/24935896/resourcemanager-unable-to-find-resource-emailtemplate-vm-in-any-resource-loa Not the answer you're looking for?

Not sure if the warning is important at this point because I get it both when I startup Tomcat standalone or via eclipse. Velocity Template Resource Not Found Exception Re: Loading Velocity template 843844 Jan 2, 2008 11:41 AM (in response to 843844) hi i am using jdk1.5 , velocity 1.5 in the Servlet String docroot = request.getRealPath( "." I am trying to use this in a plug-in for an RCP program java apache plugins velocity rcp share|improve this question asked Sep 25 '12 at 11:53 Arninja 3801520 add a How to respond to a ridiculous request from a senior colleague?

Velocity Resource Loader

So now the next question is is the problem something that can or has to be fixed in the servlet, or in the servlet's entry in the web.xml? http://stackoverflow.com/questions/36180753/getting-velocity-error-unable-to-find-resource-error-vm-in-any-resource-loade Re: Loading Velocity template 843844 Apr 3, 2007 1:40 PM (in response to 843842) Hi i'm not able to load the template in a servelet i'm working on . Unable To Find Resource 'error.vm' In Any Resource Loader Many thanks, David 5127Views Tags: none (add) This content has been marked as final. Velocity Classpath Resource Loader Example All commenting, posting, registration services have been turned off.

All the above classes come from package org.apache.velocity* share|improve this answer answered Jun 20 at 16:40 SheoSinha 412 add a comment| up vote 0 down vote While using embedded jetty the Check This Out Related 5Apache Velocity: Is there a standard way of verifying the correctness of a template from the command line?2Unable to load template when URLResourceLoader is used with Velocity2Velocity can't find resource Why does a (D)DoS attack slow down the CPU and crash a server? Not the answer you're looking for? Spring Boot Resourcemanager : Unable To Find Resource 'error.vm' In Any Resource Loader.

Why is Titanic's Astor asking if Jack is from the Boston Dawsons? Browse other questions tagged java web-applications velocity or ask your own question. Browse other questions tagged java scala velocity or ask your own question. http://amazonfonts.com/unable-to/unable-to-load-resource-java-error.html more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Here is the code snippet written in Scala to render the template helloworld.vm in ${basedir}/src/main/resources folder: com.ggd543.velocitydemo import org.apache.velocity.app.VelocityEngine import org.apache.velocity.VelocityContext import java.io.StringWriter /** * @author ${user.name} */ object App { File.resource.loader.path Velocity Relative Is a .photography domain currently a good choice for a portfolio website? Hot Network Questions Search for text in a file, then rename the file with that text How to select a good sleeping bag liner Has Darth Vader ever been exposed to

It worked after i specified them as below. Specify

more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation One thing I read was that people had jar'd up their templates and put them in WEB-INF/lib on deployments. Why credit card information mostly not stolen? Resourcemanager Unable To Find Resource Vm_global_library Vm In Any Resource Loader asked 4 years ago viewed 2049 times active 4 years ago Blog Stack Overflow Gives Back 2016 Developers, Webmasters, and Ninjas: What’s in a Job Title?

Help, my office wants infinite branch merges as policy; what other options do we have? But that shouldn't affect a FileResourceLoader, right? I think there is a problem with Velocity not seeing my templates for some reason. have a peek here Looking for '/WEB-INF/toolbox.xml' 15:42:09,781 INFO http-8282-1 org.apache.velocity.tools.view.servlet.ServletToolboxManager - Using config file '/WEB-INF/toolbox.xml' web.xml: velocity index.html index.htm index.jsp default.html default.htm

I have attached my web.xml. Re: Loading Velocity template 843842 Apr 11, 2006 7:28 AM (in response to 843842) To acces the Velocity template i have used the below coding Properties p = new Properties(); p.setProperty(