• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having Problem Compiling Servlet Code "Hands on MVC"

 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to compile the servlet BeerSelect which gets the list from BeerExpert. But it is giving an error

package com.example.model does not exist
src\com\example\web\BeerSelect.java:13: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be=new BeerExpert();
^
src\com\example\web\BeerSelect.java:13: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be=new BeerExpert();

Please hel me what do I do.. How do I make this package available?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please hel me what do I do.. How do I make this package available?

How did you compile it ? You need to set the "src" directory in your classpath. Please check this thread. If you still can't figure it out yourself, please post your javac command line.
 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Christophe. Problem solved. I had to set src in the classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic