title: setting up dependencies in a maven project in Netbeans
body: <p>I have a maven based project, which I need to setup in my netbeans. After many a hours I still cannot figure out following issues. </p>
  
  <ol>
  <li>The tomcat is installed by Netbeans, but still I'm unable to resolve
  imports for packages like:</li>
  </ol>
  
  <hr>
  
  <pre><code>import org.apache.http.protocol.BasicHttpContext;
  import org.apache.http.protocol.HttpContext;
  </code></pre>
  
  <hr>
  
  <pre><code>import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  </code></pre>
  
  <hr>
  
  <pre><code>import org.json.JSONObject;
  import org.json.JSONTokener;
  </code></pre>
  
  <hr>
  
  <p>What I'm struggling to understand is whether all these packages will be provided by Java EE container or we have to manually install them with our app. According to my little understanding of Java Web apps, I suspect that tomcat should have taken care of these dependencies by now. However, it is not appearing so.</p>
  
  <p>I hope someone is able to clarify and at the same time provide some intuition behind structuring of Java based webapps using maven and spring. </p>