title: Eclipse and JSP programing. Where to store classes?
body: <p>I am trying to learn some JSP programming with Eclipse and I am having some issues:</p>
  
  <p>Here is what I have:<br>
  1) Have test.jsp file inside WebContent folder that simply displays "Hello World!". I selected file and clicked Run As. Asked me to restart Tomcat server. Clicked Yes and page opened inside Eclipse showing "Hello World!".<br>
  2) I wrote Car class and stored it inside Java Resources/src<br>
  3) Tried to reference Car class in my test JSP and everything seemed right. (code below)</p>
  
  <pre><code>&lt;%@ page import="ws.example.*" %&gt;
  &lt;%  
      car myCar = new car("dodge", "neon");
      out.println(myCar.getMake());
  &amp;&gt;
  </code></pre>
  
  <p>4) Clicked "Run As" again and I got Hello World message. Clicked refresh, error showed up that car MyCar = new car("dodge", "neon"); cannot be resolved to a type.<br>
  5) Clicked Refresh again 2 times and second time message "Hello World!" showed up.<br>
  6) Kept clicking Refresh button and sometime I would have error, sometime Hello World. I understand that Hello World is coming from cash, but how can I avoid this? Very annoying.</p>
  
  <p>Questions:<br>
  1) When I make change in my project, how can I make sure those changes are included when I start the project?<br>
  2) Where is the good place to store your classes? Obviously what I try didn't work.</p>
  
  <p><strong>UPDATED:</strong></p>
  
  <p>Here is my class:</p>
  
  <pre><code>package ppp;
  
  public class MyCar {
  
      String make;
      String model;
  
      public MyCar(String make, String model) {
          this.make = make;
          this.model = model;
      }
  
      public String getMake()
      {
          return make;
  
      }
      public String getModel()
      {
          return model;
      }
  }
  </code></pre>
  
  <p>here is my JSP code (NewFile.jsp):</p>
  
  <pre><code>&lt;%
      ppp.MyCar car = new ppp.MyCar("", "");
  %&gt;
  </code></pre>
  
  <p>Project Structure:  </p>
  
  <pre><code> TestProject  
       - Deployment Descriptor: TestProject  
       - Java Resources  
           - src  
               - MyCar.java   
           - Libraries  
               - ...  
       - JavaScript Resources    
       - build  
       - WebContent  
           - META-INF
           - WEB-INF
           - NewFile.jsp
  </code></pre>
  
  <p>I just don't see any room for error here.</p>
  
  <p>thanks</p>