010011010110000101110100011101000010000001000010011101010111010001100011011010000110010101110010
Quick Links  
Home
Docs & How-Tos
Search
 
QueryPath

Books  

Drupal

Drupal, JavaScript, and jQuery.


LDAP


OpenCMS




 
Projects  
Anadem
Caryatid
OpenCms Modules
Pilaster
Sinciput
Utilities
Widgets (AJAX)
iPhone Apps
 

Velocity Variable Scope and mergeTemplates()

How variables in one template managed to bleed into another unrelated template.

Author: M Butcher
Date: 2008-01-10 12:47:46 -0500

While working on an Apache Velocity website, I noticed an interesting behavior: Velocity was re-using variables across requests. A variable set during request A was still available in request B -- even if I re-created the context, the engine, and all.

After reading the code, scouring the bug database for Velocity, reading the Wiki, and reading many, many mailing list posts, I finally found the problem: Velocity uses your Map objects to cache its variables. And a static Map can turn into a global namespace.

I posted a detailed blog on this at the Rhizome/Sinciput site.
News
R
S
S
News
Docs and How-To's
Releases
Links
 

Search

Google
  Web aleph-null.tv   

 

 

Questions? Comments? Consulting Opportunities? Email matt at aleph-null.tv.