title: NoClassDefFoundError when running app with external lib with Tomcat
body: <p>I'm trying to run a project with Apache Tomcat 5.5. Since I don't have a pom.xml, and I need to use a Json library, I added that particular library to my dependencies (Project Structure -> Modules -> Dependencies) in IntelliJ, with "compile" scope. My IDE shows no errors or warnings and I can build the project just fine. However, when I run it with Apache Tomcat 5.5 (which is configured as follows)</p>
  
  <pre><code>&lt;Context path="/EmblematicaHispanica" docBase="C:\Users\dantelo\IdeaProjects\emblematica-hispanica" debug="0"&gt;
  &lt;!-- EmblematicaHispanica --&gt;
  &lt;Resource
      name="jdbc/J2EE-ExamplesDS"
      auth="Container"
      type="javax.sql.DataSource"
      factory="org.apache.commons.dbcp.BasicDataSourceFactory"
      driverClassName="com.mysql.jdbc.Driver"
      url="jdbc:mysql://localhost:3306/emblema?useSSL=false"
      username="..."
      password="..."
      maxActive="4"
      maxIdle="2"
      maxWait="10000"
      removeAbandoned="true"
      removeAbandonedTimeout="60"
      logAbandoned="true"
      validationQuery="SELECT 1"/&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>everything works fine, except where I call the function that uses that lib, where I get the following error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/json/JSONObject
  </code></pre>
  
  <p>I've been searching for a solution for a while but so far no luck</p>