title: Get Request Attributes in JavaScript
body: <p>When loading a page, I have the following in my controller:</p>
  
  <pre><code>request.setAttribute("myAtt", "Testing");
  </code></pre>
  
  <p>I want to access this in my JSP file. In the HTML section, I am familiar with using things like:</p>
  
  <pre><code>${myAtt} ${requestScope.myAtt}
  </code></pre>
  
  <p>and the like. However, I've never been sure how to access request parameters in JavaScript. I've tried a number of things, such as:</p>
  
  <pre><code>var jsAtt = ${myAtt};
  var jsAtt = '${myAtt}';
  var jsAtt = eval(${myAtt});
  var jsAtt = eval('${myAtt}');
  </code></pre>
  
  <p>etc, but nothing seems to work.</p>
  
  <p>Is there a way to grab request attributes via JavaScript? Please no jQuery, servlets, etc. I want pure JavaScript code.</p>
  
  <p>I am kind of amazed I didn't find this already asked. So sorry if it is a duplicate and I just didn't see the orignal. </p>