The Artima Developer Community
Sponsored Link

Java Buzz Forum
2003-03-04 WebWork with Velocity templates… ...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jerome Bernard

Posts: 171
Nickname: jeje
Registered: Oct, 2002

Jerome Bernard is consultant working for StepInfo.
2003-03-04 WebWork with Velocity templates… ... Posted: Jul 29, 2003 12:48 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Jerome Bernard.
Original Post: 2003-03-04 WebWork with Velocity templates… ...
Feed Title: Kalixia
Feed URL: http://feeds.feedburner.com/kalixia/?cat=3
Feed Description: A small place for distributed computing...
Latest Java Buzz Posts
Latest Java Buzz Posts by Jerome Bernard
Latest Posts From Kalixia

Advertisement
WebWork with Velocity templates… Finally I was able to configure WebWork in order to properly find the Velocity templates.Here is how my webwork.properties extract looks like: runtime.log.invalid.references = true resource.loader = file, class, devel_work resource.manager.logwhenfound = false velocimacro.library=WEB-INF/classes/webwork.vm file.resource.loader.path = / class.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader class.resource.loader.cache = true class.resource.loader.modificationCheckInterval = 0 devel_work.resource.loader.path = /development/kalixiashop/src/webapp devel_work.resource.loader.cache = true devel_work.resource.loader.modificationCheckInterval = 1What is really important to understand is that if you want to use your templates packaged in the WAR, you have to use: file.resource.loader.path = /I spent a lot of time wondering what was happening and finally understood that even though Velocity does not care about the name of the loader (in this case file), the WebWork servlet does! So do not try to do something like this, it won't work: resource.loader = war, class, devel_work resource.manager.logwhenfound = false velocimacro.library=WEB-INF/classes/webwork.vm war.resource.loader.path = / class.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader class.resource.loader.cache = true class.resource.loader.modificationCheckInterval = 0 devel_work.resource.loader.path = /development/kalixiashop/src/webapp devel_work.resource.loader.cache = true devel_work.resource.loader.modificationCheckInterval = 1

Read: 2003-03-04 WebWork with Velocity templates… ...

Topic: PATROL Express 3.0 Previous Topic   Next Topic Topic: my pet bug, or another example of how sun doesn't get community development

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use