This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

compilation problem

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,i was developed a beerselection web app which is in head first servlets and jsp book.
this regard i used to create 2 packages one is having BeerExpert.
class(BeerExpert class is execouted) and another is having BeerSelect but is the main problem when iam trying to compile servlet having BeerSelect class file compiler is showing Errors...

1.cannot find symbol BeerExpert
2.cannot find symbol model

I set classpath to --->C:\Program Files (x86)\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar

and BeerExpert.class file is in --->C:\Program Files (x86)\Apache Software Foundation\Tomcat 5.5\webapps\Beer\WEB-INF\classes\com\example\model\BeerExpert.class
cmd prompt is with c:\users\ravi\desktop>

servlet code
------------------

Plain old java class
------------------------


can any one suggest me...


[Edit - added code tags and formatted - see UseCodeTags]
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Ravi!

This is wrong:


You need to either import a specific class, or use the wildcard import


The first one is generally preferred as it makes it clear which classes are coming from which packages.

 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ravi kapa wrote:
2.cannot find symbol model



People will be better able to help you if you indicate clearly which line is causing the problem.
 
Ravi kapa
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i done what you said but it still not compiling...i think the compiler is not finding that class or package....
 
Ravi kapa
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my web app
got compiled.....
 
reply
    Bookmark Topic Watch Topic
  • New Topic