title: springsecurity role check inside javascript
body: <p>Is it adivisable to use java scripting inside JSP as below,</p>
  
  <pre><code>var f = null;
    '&lt;sec:authorize access="hasAnyRole(\'c2ladmin\',\'provider\')"&gt;'
    f = function() {
        alert('hi');
    }
    '&lt;/sec:authorize&gt;';
  
    '&lt;sec:authorize access="hasRole(\'teacher\')"&gt;'
    f = function() {
        alert('teacher');
    }
    '&lt;/sec:authorize&gt;';
  </code></pre>
  
  <p>Note: Need to render view from Javascript based on the role of the user.</p>