aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HF Servlet and Java - MVC tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HF Servlet and Java - MVC tutorial" Watch "HF Servlet and Java - MVC tutorial" New topic
Author

HF Servlet and Java - MVC tutorial

Tarry Smith
Greenhorn

Joined: Apr 03, 2005
Posts: 2
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
Jose Esteban
Ranch Hand

Joined: Nov 28, 2004
Posts: 102
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 ]
Tarry Smith
Greenhorn

Joined: Apr 03, 2005
Posts: 2
Thanks a lot Jose !

This really helped,I guess the book has a correction becuase there it is ":classes:."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HF Servlet and Java - MVC tutorial