IntelliJ IDE error, java: package javax.servlet does not exist

As the title says, I'm getting an error when trying to run a basic application in IntelliJ

I know from reading results in Google that the servlet jar seems to be missing, but I have no idea how to add this. The jar file is present in the TomCat installation, but not being recognised by IntelliJ.

Can someone help? This is my first adventure into using Java to build web applications, so I'm a little in-experienced sadly.
SheppardDigitalAsked:
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.

GeNeRaL971Commented:
- on eclipse : click right on the project then choose properties. On the  Java Build Path/Libraries tab you clic on the  bouton Add external jar or add jar. And here you go serch the jar servlet-api.jar.You can also click on the bouton Add library and select server runtime hen Tomcat (if you use Tomcat)

- An other possibility if you don't have tools mentioned above and if you are on windows : click right on the workstation Then properties . Advanced tab, click on variable of environment . Add a   variable of environmentmet called CLASSPATH and puts the way which leads in servlet-api.jar. Same Approach  on unix-linux but we need to creat the variable in the hand and the exporter.
0
SheppardDigitalAuthor Commented:
I'm using IntelliJ and not eclipse.

I do however have eclipse setup and working fine, it's just IntelliJ I can't get work.

I'm using a Mac.
0
CEHJCommented:
I don't use it either but: http://stackoverflow.com/posts/24843914/revisions

Select the jar that's in Tomcat - you might as well if you're going to stick with that server
0

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
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
Java

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.