File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes my servlet doesnt work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "my servlet doesnt work" Watch "my servlet doesnt work" New topic

my servlet doesnt work

maheshm morem

Joined: Sep 23, 2010
Posts: 26
please some one help me,
i have make progogram and complied in javac compiler it it gives me error, as follow
packege javax.servlet doesnot exist.
what i have to do for this where i will get these package
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

This is the package that contains the rquired class files for the servlet api.

You can google out the servlet-api.jar file or the same file can be found in lib directory of your tomcat.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Check this FAQ.

[My Blog]
All roads lead to JavaRanch
Han Jie

Joined: Sep 24, 2010
Posts: 24
servlet-api.jar does not in your classpath maybe
you can get it on jcp official website(latest release of it is 3.0 and i just got it) or proper lib of tomcat like the 2nd floor
both are ok

this is firsttime to be here, glad to meet you and others.!

Soumyajit Hazra
Ranch Hand

Joined: Jun 26, 2007
Posts: 136
If you are using Tomcat then you will get the servlet_api.jar in "<Tomcat Home>\apache-tomcat-6.0.18\lib" location. If you are using websphere or weblogic then search for j2ee.jar and put it in classpath then compile your code.

Java Programmer | SCJP 1.5 | SCWCD 1.4
I agree. Here's the link:
subject: my servlet doesnt work
It's not a secret anymore!