• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MVC Example Chapter 3 HFS

 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

I was trying out the MVC example of chapter 3.

I created a Model under d:\myprojects\beerv1\src\com\example\model\BeerExpert.java

I created a controller under
d:\myprojects\beerv1\src\com\example\web\BeerSelect.java

The model was successfully compiled & the target folder of the class file was
d:\myprojects\beerv1\classes\com\example\model\BeerExpert.class

When I try to comile the controller, it gives me a error saying that com.example.model, no such package exists. I am trying to use the model in my servlet. Can you tell me where I am going wrong

I am compiling the controller with the following syntax
d:\myprojects\beerv1>javac -d classes src\com\example\web\BeerSelect.java

Please help...
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try to include classpath "-classpath classes" when you compile your code.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic