• 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

HFSJ doubts

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all , i'm trying the HFSJ mini mvc application.i have made the appropriate directory structure in my system as is specified there. But when i tried to compile the BeerSelect.java servlet file given in page 84 , the comipler giving error like package com/example/model doesnt exist, though it is very much there.i'm using jdk1.5 with Tomcat 5.0.Thats why i'm also compiling the BeerExpert.java file with javac -source 1.4 format.I'm not getting any error there but not able to compile the BeerSelect.java servlet file.. Anybody Plz sort it out.. I'm getting tension....


Life is full of trouble
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to give us a better idea of how your directories are structured, where you execute the command and what command you execute.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your classpath is not set up correctly.
See: http://faq.javaranch.com/view?CompilingServlets
for help with classpaths.
[ November 18, 2005: Message edited by: Ben Souther ]
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am hoping you set the classpath to
\TomcatInstallDirectory\common\lib\servlet-api.jar
 
hem kumar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank u all forthe advice. Now the program is running correctly but only after i set classpath to point to the directory structure where classes are there. But my doubt is why the JVM didnt get the classes from the current directory.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by mohan anand:
But my doubt is why the JVM didnt get the classes from the current
directory.



It only looks in the current directory if the current directory is on the classpath.


The dot is the symbol for "this directory".
 
hem kumar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi BEN thank u very muh for clearing the doubt regarding the "." symbol in classpath structure.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mohan,

I am planning to buy a good book on servlets and java.How much do rate Head First servlats and Jsps.Is it a good book.

with regards
priyanka
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

HFSJ is one of the best book ever i read regarding Servlet and JSP.
It clears every step what the book has written.

Cheers and Enjoy
Chidanand Chauhan
reply
    Bookmark Topic Watch Topic
  • New Topic