Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to compile servlet

 
billy williams
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone ,
i am new to javaranch .

i have a error when is compiled the servlet file , mentioned below --


i got six errors , but i have tomcat

 
Pulkit Dave
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

javax.servlet.*;
and
javax.servlet.http.*;

packages are in a jar file.. "servlet-api.jar"
you have to set your classpath to it...

rest is fine
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "servlet-api.jar" file needs to be in the classpath. You can find it in the common/lib directory of your Tomcat installation.
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:... You can find it in the common/lib directory of your Tomcat installation.


In tomcat 6 it's directly inside "lib" no "common" folder.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also a FAQ about this.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48967
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch, Pulkit Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic