aspose file tools
The moose likes Beginning Java and the fly likes compilation error of servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "compilation error of servlet" Watch "compilation error of servlet" New topic
Author

compilation error of servlet

Kondapally Ashwin
Greenhorn

Joined: May 16, 2006
Posts: 25
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

Joined: Feb 24, 2006
Posts: 6603
    
    1

Make sure the folders exist in your classpath


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Kondapally Ashwin
Greenhorn

Joined: May 16, 2006
Posts: 25
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
Marshal

Joined: Mar 22, 2005
Posts: 35443
    
    9
C:\introcs\s1314\model


The classpath must not contain the directories for packages. Use "C:\introcs" instead.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: compilation error of servlet
 
Similar Threads
Strange Problem with servlet output
Problem with Packages / Utility Classes in Servlets
servlet context listener problem
unable t o compile the servlet .. plz help
unable to compile servlet