• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HF Servlet and Java - MVC tutorial

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Jose !

This really helped,I guess the book has a correction becuase there it is ":classes:."
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic