When loading a page, I have the following in my controller:
request.setAttribute(myAtt, Testing);
I want to access this in my JSP file. In the HTML section, I am familiar with using things like:
${myAtt} ${requestScope.myAtt}
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:
var jsAtt = ${myAtt};
var jsAtt = '${myAtt}';
var jsAtt = eval(${myAtt});
var jsAtt = eval('${myAtt}');
etc, but nothing seems to work.
Is there a way to grab request attributes via JavaScript? Please no jQuery, servlets, etc. I want pure JavaScript code.
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.