You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Apache Wiki <wi...@apache.org> on 2005/04/16 02:27:05 UTC
[Jakarta-velocity Wiki] Update of "VelocityFAQ" by WillGlassHusain
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 WillGlassHusain:
http://wiki.apache.org/jakarta-velocity/VelocityFAQ
The comment on the change is:
more detail on VVS singleton vs VelocityEngine
------------------------------------------------------------------------------
* A: This is because Struts' !ActionServlet needs to be initialized before trying to use the Struts tools. Have a look at your web.xml file and make sure it starts up first. (Nathan Bubna)
[[BR]]
* Q: Why is the !VelocityServlet deprecated in favor of Tools !VelocityViewServlet?
- * 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)
+ * 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?
- * A: Because it's no longer sharing a configuration with VVS. (Will Glass-Husain) '''TODO: add a link to the list archive.'''
+ * 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)
=== DVSL & Anakia & Texen & Misc ===
* Q: Is DVSL stable enough for use in production environment?
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org