title: The type javax.servlet.http.HttpServletResponse cannot be resolved. It is indirectly referenced from required .class files
body: <p>I am new to spring try to create application so that i can learn how its work. However when i wrote code <code>Eclipse IDE gives</code></p>
  
  <p><strong>The type javax.servlet.http.HttpServletResponse cannot be resolved.It is indirectly referenced from required .class files</strong></p>
  
  <p>here is my class</p>
  
  <pre><code>package testPackage;  
  import org.springframework.web.servlet.ModelAndView;
  import org.springframework.web.servlet.mvc.SimpleFormController;
  import domain.serviceLayer.UserService;
  import domain.userDetails.User;
  
  @SuppressWarnings("deprecation")
  public class UserLoginFormController extends SimpleFormController  {
      private UserService userService;
  
      public UserLoginFormController() {
          setCommandClass(User.class);
          setCommandName("user");
      }
      public void setUserService(UserService userService) {
          this.userService = userService;
      }
  
      @Override
      public ModelAndView onSubmit(Object command) throws Exception {
          // TODO Auto-generated method stub
  
          User user = (User) command;
          userService.add(user);
          ModelAndView modelAndView = new ModelAndView("success", "user", user);
          return modelAndView;
      } 
  }
  </code></pre>
  
  <p>and pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                        http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;learnSimpleFormController&lt;/groupId&gt;
      &lt;artifactId&gt;learnSimpleFormController&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;  
      &lt;properties&gt;
          &lt;spring.version&gt;3.2.3.RELEASE&lt;/spring.version&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;!-- Spring 3 dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;   
      &lt;!-- Servlet --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
              &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;learnSimpleFormController&lt;/finalName&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Please what is problem and how to remove that error</p>