aspose file tools*
The moose likes Beginning Java and the fly likes unable to compile servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "unable to compile servlet" Watch "unable to compile servlet" New topic
Author

unable to compile servlet

billy williams
Greenhorn

Joined: Sep 02, 2009
Posts: 4
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

Joined: Sep 02, 2009
Posts: 1
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
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
The "servlet-api.jar" file needs to be in the classpath. You can find it in the common/lib directory of your Tomcat installation.


Ping & DNS - my free Android networking tools app
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3832

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.

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

There's also a FAQ about this.


[My Blog]
All roads lead to JavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38873
    
  23
And welcome to the Ranch, Pulkit Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to compile servlet