jsp errors IsUserInRole() and others
<p>I am trying to redeploy a project that fell into my hands. It's a maven project with javax.servlet-api among the dependencies it's using:</p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;  
        &lt;version&gt;2.5&lt;/version&gt;  
    &lt;/dependency&gt;
</code></pre>

<p>To this, I'm getting error in jsp-s, including the following. </p>

<blockquote>
  <p>The method getIsUserInRole() is undefined for the type HttpServletRequest. </p>
</blockquote>

<p>and </p>

<blockquote>
  <p>Multiple annotations found at this line:
      - Undefined attribute name 
       (id).
      - Unknown tag (canvas).
      - Undefined attribute name 
       (style).</p>
</blockquote>

<p>For this, I changed the servlet version to 3.0.1: </p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;  
        &lt;version&gt;3.0.1&lt;/version&gt;  
    &lt;/dependency&gt;
</code></pre>

<p>However, i still have the same errors. The jstl version (ir relevant) on build path is 1.2. </p>

<p>How to fix this?</p>

<p>Why am i to explicitly define servlet-api of any kind, doesn't the servlet container have it? 
If so, how to tell JBoss to use servlet version 3.0.1?</p>

<p>I'm running JBoss 7.1 on Eclipse Neon. I tried and got the same thing on Eclipse Mars. </p>

<p>TIA. </p>

<p>//-------------------------------</p>

<p>EDIT:</p>

<p>getIsUserInRole() is the name coming up in Eclipse problem report. here's a snapshot:</p>

<p><a href="http://i.stack.imgur.com/06GOj.png" rel="nofollow">enter image description here</a></p>

<p>The method name is spelled correctly in the code:</p>

<pre><code>&lt;c:if test="${not empty pageContext.request.userPrincipal}"&gt;
    &lt;c:if test="${pageContext.request.isUserInRole('ROLE_ADMIN')}"&gt;
                &lt;button class="custombutton" id="admin" style="font-size: 150%; height:80px; width: 100%"&gt;Administration [Admin. Profile]&lt;/button&gt;

    &lt;/c:if&gt;
&lt;/c:if&gt;
</code></pre>

<p>Also, Eclipse is reporting warnings for all canvas items-- tags, attributes names, etc. isn't recognizing them:</p>

<p><a href="http://i.stack.imgur.com/XqEfD.png" rel="nofollow">enter image description here</a></p>

<p>//-----------------</p>

<p>EDIT2:</p>

<p>There is Spring 3.2.8 in this project. could it intercept the servlet definition in some way? However, the pom.xml dependency hierarchy shows no indication of it.</p>

<p>Also, I haven't changed any Spring dependencies in the project, they are the same as the one that's been deployed and running now. </p>

<p>This looks like a build problem, however I can't see it. The previous version was deployed on IntelliJ. </p>