Forums Register Login

HF Servlet and Java - MVC tutorial

+Pie Number of slices to send: Send
Page : 84
I am not able to compile the Servlet version two code.
I have got all the package structure identical to mentioned in the book BUT while compiling the servlet code after doing the changes for version two i am getting the following error... Any help will be appreciated

F:\Tarry\HF Servlets and JSP\MyProjects\beerV1>javac -classpath e:/servlet-api.j
ar -d classes src/com/example/model/BeerExpert.java
Note: src/com/example/model/BeerExpert.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

F:\Tarry\HF Servlets and JSP\MyProjects\beerV1>javac -classpath e:/servlet-api.jar -d classes src/com/example/web/BeerSelect.java
src/com/example/web/BeerSelect.java:3: package com.example.model does not exist
import com.example.model.*;
^
src/com/example/web/BeerSelect.java:20: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
src/com/example/web/BeerSelect.java:20: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
3 errors
+Pie Number of slices to send: Send
Try to compile using:

javac -classpath e:/servlet-api.jar;clases;. -d classes src/com/example/web/BeerSelect.java

Watch the extra ";classes;."
[ April 03, 2005: Message edited by: Jose Esteban ]
+Pie Number of slices to send: Send
Thanks a lot Jose !

This really helped,I guess the book has a correction becuase there it is ":classes:."
30 seconds to difuse a loaf of bread ... here, use this 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 1163 times.
Similar Threads
Not able to import
help for HFSJ - CH 3 Page 84
Problem in accessing model in diffeerent package(Servlet-HFS)
help for HFSJ - CH 3 Page 84
problem while compiling
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:07:42.