How to set up class path in Eclipse IDE to include Server Runtime jars
(Aka I am getting errors that The import javax.servlet cannot be resolved. How do I fix it?)
(Aka I am getting errors that The import javax.servlet cannot be resolved. How do I fix it?)
Solution:
If you get this compilation error, it means that you have not included the servlet jar in the classpath. The correct way to include this jar is to add the Server Runtime jar to your eclipse project. You should follow the steps below to address this issue:
Error Screen Shot:
Step 1- Right click on the project and open Configure Build Path menu (shown below):
Step 1 Screen Shot:
Step 1 Screen Shot:
Step 2- Click on the libraries tab and choose Add library option:
Step 2 Screen Shot:
Step 2 Screen Shot:
Step 3- From the Add Library screen, choose Server Runtime:
Step 3 Screen Shot:
Step 3 Screen Shot:
Step 4- Choose Apache Tomcat v6.0 and hit finish:
Step 4 Screen Shot:
Now every thing is compiled correctly, as you would expect:
Step 5 Screen Shot:
Step 5 Screen Shot:
thanks you:) my problem solved 🙂
thanks your method is working
very greatful to you
+1
thankyou..
thank u so much..:) 🙂 keep it up!!
Pingback: How To Fix Javax Error in Windows
Thank you
I am glad you found this useful
Great
very helpful..thanks 🙂
Thanks Dude, your Answer is very helpful ….