Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-velocity Wiki" 
for change notification.

The following page has been changed by TimColson:
http://wiki.apache.org/jakarta-velocity/VelocityFAQ

------------------------------------------------------------------------------
   * A: You can apply the patch at 
[http://issues.apache.org/bugzilla/show_bug.cgi?id=28388 Bugzilla 28388], or 
try the solution provided by Fred Toth using a combination of a tool and a 
macro.  See 
[http://mail-archives.apache.org/mod_mbox/jakarta-velocity-user/200405.mbox/[EMAIL
 PROTECTED] the mail archive] for details.
  
   * Q: Fred Toth's solution doesn't work for VelocityTools 1.2.  :(
-  * A: From 1.2, VelocityViewServlet uses the SeparateInstanceModel.  You will 
have to set the VelocityEngine instead of the Velocity singleton class.  The 
ViewRenderTool shows how you can do that.  If somebody has the time, the code 
should be coming up on the wiki.  ;)
+  * A: From 1.2, !VelocityViewServlet uses the !SeparateInstanceModel.  You 
will have to set the !VelocityEngine instead of the Velocity singleton class.  
The !ViewRenderTool shows how you can do that.  If somebody has the time, the 
code should be coming up on the wiki.  ;)
  [[BR]]
  
  === Velocity Tools ===
@@ -49, +49 @@

   * A: Some time back, the Velocity Developers decided it might be better to 
separate web functionality from the core Velocity engine. They decided that 
VelocityTools would be a better place to drop this functionality. Nobody has 
had the guts to remove !VelocityServlet from the Core, maybe in 2.0? <grin>  
(Tim Colson)  Deprecate in 1.5, remove in 1.6 / 2.0 (whatever is next)?  (Will 
Glass-Husain).
  [[BR]]
   * Q: (since VelocityTools 1.2) Why doesn't my non-web use of Velocity no 
longer work?  For example, I have code that allows the user to send email 
(based on a Velocity template) from a web app and it no longer works.
-  * A: One possibility is that it might not be sharing a configuration with 
VelocityViewServlet. More specifically, VelocityViewServlet was previously 
based on a singleton Velocity class.  If you had other uses of Velocity within 
the same webapp that also used the singleton Velocity class, they would share 
configuration data.  Now VelocityViewServlet uses a VelocityEngine instance to 
process templates.  You can get this instance for other uses of velocity by 
calling getVelocityEngine from a subclass.  Or, create and configure a second 
instance of VelocityEngine.  (while slightly more involved, this allows 
different configuration options which are often desired).  (Will Glass-Husain) 
+  * A: One possibility is that it might not be sharing a configuration with 
!VelocityViewServlet. More specifically, !VelocityViewServlet was previously 
based on a singleton Velocity class.  If you had other uses of Velocity within 
the same webapp that also used the singleton Velocity class, they would share 
configuration data.  Now !VelocityViewServlet uses a !VelocityEngine instance 
to process templates.  You can get this instance for other uses of velocity by 
calling get!VelocityEngine from a subclass.  Or, create and configure a second 
instance of !VelocityEngine.  (while slightly more involved, this allows 
different configuration options which are often desired).  (Will Glass-Husain) 
  
  === DVSL & Anakia & Texen & Misc ===
   * Q: Is DVSL stable enough for use in production environment?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to