• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compilation error of servlet

 
Kondapally Ashwin
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a java file League.java



And I have a servlet


The League class is compiled in the folder s1314\model and the servlet file is placed in the folder s1314\view.

I am getting some errors like "package s1314.model does not exist" and "cannot find symbol class 'League'".

Please advise me why I am getting such compilation errors.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure the folders exist in your classpath
 
Kondapally Ashwin
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used the command javac -classpath C:\Tomcat5.5\lib\servlet-api.jar;C:\introcs\s1314\model ListLeaguesServlet.java

But I am still getting the same error.

Please advise.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\introcs\s1314\model


The classpath must not contain the directories for packages. Use "C:\introcs" instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic