Javax.servlet dependency does not work
<p><strong>I am creating a Gradle project in Intellij to improve my skills because I am learning. Previously, I created the same project with Maven and It is working well.</strong></p>

<p>My project is this:
<a href="http://i.stack.imgur.com/f5MT6.png" rel="nofollow">Project</a></p>

<p>How you can see in the image "<strong>HttpServlet</strong>" is not recognised and I don't know why because I have the dependency and apparently everything is correct, here is my <strong>build.gradle</strong> with the dependency:</p>

<pre><code>group 'com.aprendiendo.java'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'war'

sourceCompatibility = 1.5

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'

    // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
    compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
}
</code></pre>

<p>In the first image It can be seen how in the <strong>Gadle Project menu</strong> -> <strong>Dependences folder</strong> is javax.servlet.... but however It does not work because I can't use anything of Java Servlet API (Classes, etc...), how you can see in the image of my project which I put before.</p>

<p>I have revised everything and I dont know what is happening.</p>