I am using the book Head First
Servlets and
JSP to get up and running on
J2EE concepts.
I had successfully managed to run the version 1 of the Beer Application after deployment.
Version 2 involves
testing and building the model class and modifying the BeerSelect.java servlet to tie it up with the model (pages 82-85 of the Indian subcontinent edition of the book)
I'm following the instructions exactly as given in the book and I'm also using an identical directory structure as recommended in the book for both my development and deployment environment.
I managed to compile and test the model class (BeerExpert) without any problems. I then modified the code in the servlet (BeerSelect) and tried to recompile it using the same command used to create packages (com.example.model and com.example.web). But I get the following error : [
SCREENSHOT : Please click "View Picture in Original Size" at the bottom of the page for better quality]
My Development Enivronment is in the directory : C:\MyMVCProjects\BeerV1
I've placed my BeerExpert.java file in this directory : C:\MyMVCProjects\BeerV1\src\com\example\model
After compilation, the class file for BeerExpert.java has been placed in this directory :C:\MyMVCProjects\BeerV1\classes\com\example\model
Version 1 of the BeerSelect.java servlet is placed in this directory : C:\MyMVCProjects\BeerV1\src\com\example\web
After compilation, the class file of version 1 of the BeerSelect.java servlet has been placed in this directory : C:\MyMVCProjects\BeerV1\classes\com\example\web
However, when I make changes to the version 1 servlet code to incorporate the usage of the model (i.e version 2 of the servlet), it doesn't compile. I have checked the code several times, and I can't see any errors with it as it is a carbon copy of what's in the book.
Can anyone please help me out of this? Thanks in advance.