• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

servlet compilation error

while compiling servlet coding it gives following message
javax.servlet.* package not found or
javax.servlet.http.* package not found

while same coding works perfectly in other computer.

What could be reason?
1 Solution

Are you sure that the servlet-api.jar is in your classpath? Make sure that this file is available.

first of all you have to use Java 2 enterprice edition not standart edition. becuase servlet interface is available in J2EE you can download the sdk from the following link


second thing just go to he classpath in your IDE and define the location of the jar file of J2EE.

i advice u to use netbeans as IDE.

most important thing is servlet-api.jar  file shud b present in ur class path.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now