# ${variables} in Servlet Listener

**URL:** <https://forum.liquibase.org/t/variables-in-servlet-listener/533>\
**Category:** General Discussion\
**Created:** [May 20, 2010, 2:59am UTC](https://forum.liquibase.org/t/variables-in-servlet-listener/533 "2010-05-20T02:59:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevemit](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@stevemit](https://forum.liquibase.org/u/stevemit)\
**Post date:** [May 20, 2010, 2:59am UTC](https://forum.liquibase.org/t/variables-in-servlet-listener/533/1 "2010-05-20T02:59:00Z")

</div>

Can we come up with a way for a Tomcat 6 web application to set change log ${variables} for the Servlet Listener?

This post says I can just set a Java system property.  
[http://liquibase.org/forum/index.php?topic=414.msg1361#msg1361](http://liquibase.org/forum/index.php?topic=414.msg1361#msg1361)

But this HOWTO says that I can’t set a Java system property from my web application.  
[http://wiki.apache.org/tomcat/HowTo#Can\_I\_set\_Java\_system\_properties\_differently\_for\_each\_webapp.3F](http://wiki.apache.org/tomcat/HowTo#Can_I_set_Java_system_properties_differently_for_each_webapp.3F)

Maybe initialization parameters or JNDI.

&nbsp; --Steve

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [May 20, 2010, 2:59am UTC](https://forum.liquibase.org/t/variables-in-servlet-listener/533/2 "2010-05-20T02:59:00Z")

</div>

There isn’t currently.&nbsp; I created a feature request for a later release to add support for it ([http://liquibase.jira.com/browse/CORE-617).](http://liquibase.jira.com/browse/CORE-617).)

For now, you could certainly create your own ServletListener that either extends the liquibase one or just use it as a starting point for your code and set parameter as you can.&nbsp; Let me know if you have questions on how.

Nathan&nbsp;

---

<div class="post-metadata">

**Author:** ![stevemit](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@stevemit](https://forum.liquibase.org/u/stevemit)\
**Post date:** [May 20, 2010, 2:59am UTC](https://forum.liquibase.org/t/variables-in-servlet-listener/533/3 "2010-05-20T02:59:00Z")

</div>

Thanks, Nathan,

That’s a good idea.&nbsp; The temporary fix on our development server is to hack the Windows registry here:

HKEY\_LOCAL\_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\Tomcat6\Parameters\Java\Options

&nbsp; --Steve
