title: Why can't I find method setContentLengthLong(long len) in HttpServletResponse?
body: <p>I am in Eclipse and some time ago I was using this method: <a href="http://docs.oracle.com/javaee/7/api/javax/servlet/ServletResponse.html#setContentLengthLong(long)" rel="nofollow">http://docs.oracle.com/javaee/7/api/javax/servlet/ServletResponse.html#setContentLengthLong(long)</a> Now I can't manage to mek it work. I am using JDK 1.7 and I have inserted the following dependency in <code>pom.xml</code>:</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.1.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I have cleaned and updated the project with Maven. I have even closed and opened Eclipse. When I write:</p>
  
  <pre><code>response.setContentLengthLong(downloadFile.length());
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>The method setContentLengthLong(long) is undefined for the type HttpServletResponse
  </code></pre>
  
  <p>What am I doing wrong?</p>