title: package com.example.model does not exist
body: <p>I have two java files. My first java file is in path which i hava compiled sucessfully:</p>
  
  <pre><code>C:\MyProject\BeerV1\source\com\example\model\BeerExpert.java
  </code></pre>
  
  <hr>
  
  <pre><code>package com.example.model;
  import java.util.*;
  public  class BeerExpert
  {
    public List getBrands(String color)
  
  
  
  package  com.example.web;
  import com.example.model.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  import java.io.*;
  import java.util.*;
  
  public class BeerSelect extends HttpServlet
  {
  public void doPost(HttpServletRequest request,HttpServletResponse response)throws IOException, ServletException
  {
      String c = request.getParameter("color");
      BeerExpert be = new BeerExpert();
      List  result = be.getBrands(c);
   response.setContentType("text/html");
  PrintWriter out =response.getWriter();
  
  out.println("Beer Selection Advice&lt;br&gt;");
  //String c = request.getParameter("color");
  //out.println("&lt;br&gt;Got beer color "+c);
          Iterator it = result.iterator();
          while(it.hasNext())
          {
                  out.print("&lt;br&gt; try: " +it.next()); 
  }       
  }
  }
  </code></pre>
  
  <p>following is the path i am using for compiling but i am getting following error </p>
  
  <pre><code>C:\&gt;javac -cp "C:\MyProject\BeerV1\source\com\example\model\*;C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\servlet-api.jar" 
  C:\MyProject\BeerV1\source\com\example\web\BeerSelect.java
  
  C:\MyProject\BeerV1\source\com\example\web\BeerSelect.java:2: 
  error: package com.example.model does not exist
  import com.example.model.*;
  ^
  </code></pre>