title: Change the document title when page load using jstl and javascript
body: <p>I am changing the document page title when page loads using below method. I am using jstl 1.0.2</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  
  &lt;script type="text/javascript" language="JavaScript"&gt;
  function updateTitle() { 
      document.title = '&lt;c:out value="${titleName}"/&gt;';
  }
  
  window.onload=updateTitle;    
  &lt;/script&gt;
  
  &lt;body&gt;
  &lt;% if(somecondition) { %&gt;
  &lt;c:set var="titleName" value="new title"/&gt;
  &lt;% }else if (othercondition){ %&gt;
  &lt;c:set var="titleName" value="other title"/&gt;
  &lt;%}%&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But i am getting  </p>
  
  <pre><code>This attribute does not support request time values.
      document.title = '&lt;c:out value="${titleName}"/&gt;';
  </code></pre>
  
  <p>In web.xml, I have already define <code>xmlns:c="urn:jsptld:http://java.sun.com/jstl/core"</code> and the jsp page also i have define <code>&lt;%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%&gt;</code></p>
  
  <p>What other configaration i need to add in order to make above work and also i want to know whether my approach is correct too?</p>