Forums Register Login

MVC Example Chapter 3 HFS

+Pie Number of slices to send: Send
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...
+Pie Number of slices to send: Send
try to include classpath "-classpath classes" when you compile your code.
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 631 times.
Similar Threads
package com.example.model does not exist
javac: not a directory: src\com\example\web\BeerSelect.java
servlet compiling errors
Error in compiling Servlet class
help for HFSJ - CH 3 Page 84
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:56:41.