servlet compilation error

Posted on 2006-05-29
Medium Priority
Last Modified: 2013-11-24
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?
Question by:reshampun
LVL 16

Accepted Solution

suprapto45 earned 500 total points
ID: 16784208

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


Expert Comment

ID: 16911297
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.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question