jsp form is not reaching javascript in eclipse
<p>I'm trying form validation in jsp using Javascript.
My code looks like below. My jsp page is not reaching the .js file for validation in eclipse.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function validateForm(){
 alert("entered js");
 
 var name = document.getElementsByName("name");
 var age = document.getElementsByName("age");
 var id = document.getElementsByName("id");
 
 //not null validation
 
 if(name == null || name == ""  ){
  alert("Please give your name");
 }
 
 if(age == null || age == ""){
  alert("Please give your age");
 }
 
 if(id == null || id == ""){
  alert("Pls give an id");
  
 }
 
 //age validation .. only numbers
 
 if(/\D/.test(age)){
  alert("Only numbers in age pls");
 }
 
 //id validation .. only numbers
 if(/\D/.test(id)){
  alert("only numbers in ID pls ..");
 }
 
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
&lt;script type="text/javascript" src = "/js/studentScript.js"&gt;&lt;/script&gt;
&lt;title&gt;Insert title here&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form action="/HelloWeb/controller" method="post" onSubmit="return validateForm()"&gt;

 &lt;table&gt;
 
  &lt;tr&gt;
   &lt;td&gt;&lt;label&gt;Name: &lt;/label&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input type="text" name="name"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
   &lt;td&gt;&lt;label&gt;Age: &lt;/label&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input type="text" name="age"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
   &lt;td&gt;&lt;label&gt;Id: &lt;/label&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input type="text" name="id"&gt;&lt;/td&gt;
  &lt;/tr&gt;
 
 &lt;/table&gt;
 
 &lt;input type="submit" name="submit" value="Submit" &gt;

&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;</code></pre>
</div>
</div>
</p>

<p>My project explorer looks like this</p>

<p><a href="http://i.stack.imgur.com/AgjIR.jpg" rel="nofollow">enter image description here</a></p>

<p>Please suggest a solution</p>