How to import javax.servlet.*;

Can someone tell me where i find the javax.servlet package. I am using Eclipse and when I include the import statement import javax.servlet.*; it says it cannot be resolved. searching in the package javax I find a lot of packages like security, sound, swing, xml,  but not javax.servlet. These  packages seem to be in the jar files in the jdk/jre/lib folder.

Bruce Mutch
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

servlet-api.jar   If you are using Tomcat then it is in  Tomcat/common/lib
You can download Tomcat from   
for the Servlet 2.4 API  get  or   5.0.28.tar.qz
bmutchAuthor Commented:
thanks I've got Tomcot, just need to know how to include the jar file in my project in Eclipse now that I know what the path is.

Bruce Mutch
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

>how to include the jar file in my project in Eclipse
Sorry, I don't use Eclipse.  Maybe someone will help.
Did you say eclipse, (websphere) then you should have the javax library there you don't need to import it. It comes with rt.jar file.
If you want to include the file then follow these directions:
1. right click on your project folder inside the project navigation window (make sure you are running websphere and in the project)
2. click on the properties
3. It will open a new window Properties for 'yourProject'
4. Select Java Build Path
5. Click on Libraries
6. Click on Add External JARs
7. now select the jar file from the menu you want to select, and that's it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
1) download servlet.jar
2) go to file -> new->project
3) click on java project in the widow that opens up and do next
4) specify the project name and do next
5) go to the libraries and select "ADD EXTERNAL JAR" and specify the location of servlet.jar and do finish
6) NOw run your code.

if you have already created you project :-
1. rt clk on the project in the navigator and select properties.
2. selelect "Java Build path" from the left hand box
3. select libraries tab
4. select "ADD EXTERNAL JAR" and specify the location of servlet.jar.
5. click "Finish" button.
you will then see the code being rebuilt.
bmutchAuthor Commented:
thanks all , I awarded based on the first one to give new info.

Bruce Mutch
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

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.