title: Browser doesn't recognize inclusion of external javascript/jquery file
body: <p>In my Dynamic Web Project (Eclipse), developed with the Spring MVC framework, I have the JSP page below, placed in the folder WEB-INF/jsp/ :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
    &lt;title&gt;HorarioLivre&lt;/title&gt;
  
    &lt;script src="http://code.jquery.com/jquery-2.1.0.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"&gt;&lt;/script&gt;
    &lt;script src="js/index.js"&gt;&lt;/script&gt;
  
    &lt;link rel="stylesheet" href="css/style-main.css"&gt;
    &lt;link rel="stylesheet" href="css/style-popup.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;header&gt;
      &lt;div class="container"&gt;
        &lt;h1&gt;&lt;a href="#"&gt;HorarioLivre&lt;/a&gt;&lt;/h1&gt;
        &lt;nav&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="listagem_evento.html" class="icon evento"&gt;Eventos&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="cadastra_horario.html" class="icon horario"&gt;Cadastrar Horarios&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="listagem_horario.html" class="icon horario"&gt;Listar Horarios&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="listagem_usuario.html" class="icon usuario"&gt;Usuarios&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;${usuario.nome}&lt;/a&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="usuario_perfil.html" class="icon perfil"&gt;Perfil&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="usuario_config.html" class="icon settings"&gt;Configura&amp;ccedil;&amp;otilde;es&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Logout&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/nav&gt;
      &lt;/div&gt;
    &lt;/header&gt;
    &lt;div id="results"&gt;
          &lt;a href="#" id="close"&gt;Fechar&lt;/a&gt;
          &lt;div id="content"&gt;&lt;/div&gt; 
    &lt;/div&gt;  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My problem is that apparently the application don't be reading the js/index.js file, placed in folder WebContent/js (the css files, placed in WebContent/css, are read normally). When I put some javascript / jquery code directly in the JSP page (like the code displayed in the question <a href="https://stackoverflow.com/questions/22152363/browser-doesnt-recognize-javascript-jquery-code">Browser doesn&#39;t recognize javascript / jquery code</a>), they are executed without any problems. </p>
  
  <p>Someone can find the problem with this page?</p>
  
  <p><strong>Update 1</strong></p>
  
  <pre><code>$(document).ready(function(){
     setupPopup();
  });
  
  function setupPopup() {
     $('a').click(function() {
         $('#content').load($(this).attr('href'));
        $('#container').append('&lt;div id="cover"&gt;');
        $('#results').fadeIn(500);
        popupPosition();
     });
  
     $('#close').click(function() {
        $('#results').fadeOut(100);
        $('#cover').remove();
     });
  
     $(window).bind('resize', popupPosition);
  }
  
  function popupPosition() {
     if(!$("#results").is(':visible')){ return; }
  
     $("#results").css({
        left: ($(window).width() - $('#results').width()) / 2,
        top: ($(window).width() - $('#results').width()) / 7,
        position:'absolute'
     });
  
     $('#results').draggable();
  }
  </code></pre>
  
  <p><strong>FINAL UPDATE</strong></p>
  
  <p>In the end, I choose don't use jquery, and replace the code from the header by this:</p>
  
  <pre><code>&lt;script&gt;
    function handleClick(url){
        document.getElementById("results").style.display = 'block';
        document.getElementById("content").innerHTML='&lt;object type="text/html" data="'+url+'" &gt;&lt;/object&gt;';
        }
    function cleanDiv() {
        document.getElementById("results").style.display = 'none';
        document.getElementById("content").innerHTML=' ';
    }
    &lt;/script&gt;
  </code></pre>
  
  <p>each link has this format:</p>
  
  <pre><code>&lt;a href="#" onclick="handleClick('listagem_evento.html')" class="icon evento"&gt;Eventos&lt;/a&gt;
  </code></pre>
  
  <p>and the html code for my popup window get this form:</p>
  
  <pre><code>&lt;section class="about" id="results" style="left: 183px; top: 111px;" onMouseDown="dragStart(event, 'results');"&gt;
      &lt;div align="right"&gt;&lt;a href="#" class="classname" onclick="cleanDiv()"&gt;X&lt;/a&gt;&lt;/div&gt;
      &lt;div id="content" align="center"&gt;&lt;/div&gt;
    &lt;/section&gt;
  </code></pre>
  
  <p>With the parte <strong>style="left: 183px; top: 111px;" onMouseDown="dragStart(event, 'results');"</strong> being responsible for move the popup across the screen (See the question <a href="https://stackoverflow.com/questions/22173950/how-to-drag-and-drop-a-div-across-the-page">how to drag and drop a &lt;div&gt; across the page</a>)</p>