title: set up context variable in tomcat
body: <p>I am having problem setting up tomcat context variable. 
  I have tried: </p>
  
  <ol>
  <li><p>in web.xml in root folder(note: it's not the one in conf folder) 
  I tried adding context-param, not work, this did not change anything, the context variable is still null</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;testname&lt;/param-name&gt;
      &lt;param-value&gt;testvalue&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre></li>
  <li><p>using servlet getServletContext.setAttribute("test","ok") to set variable, it does not work either, the variable just stay null all the time.</p></li>
  <li><p>i have tried to add crossContext=true in server.xml (even though i only have one webapp), it does not work.</p></li>
  </ol>
  
  <p>so any suggestions? </p>
  
  <p>Thanks</p>