Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF Servlet and Java - MVC tutorial

 
Tarry Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Jose !

This really helped,I guess the book has a correction becuase there it is ":classes:."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic