I am getting this error when trying to compile my program. I know this could be a duplicate but i could not understand the other answers given. Which file should I put on the class path and how do i do that? if indeed that is correct?
Asked
Active
Viewed 19 times
0
-
`servlet-api.jar`; how you add it to your class path depends, what have you tried? Where are you stuck? Generally, add the file to your project right-click and select "add to class path". – Elliott Frisch Jan 05 '15 at 21:08
-
@ElliottFrisch so right click, properties, libraries, add jar? – BlueShark Jan 05 '15 at 21:15
-
then build again to recompile? – BlueShark Jan 05 '15 at 21:15
-
Depends. Do you have "Build Automatically" enabled? If not yes, if yes no. – Elliott Frisch Jan 05 '15 at 21:17
-
@ElliottFrisch this is flipping dumb. on libraries it has servlet-api.jar there under C:\Users\Rich\Documents\Tomcat\lib. so how come it cant find it? – BlueShark Jan 05 '15 at 21:57
-
You should have never add this servlet-api.jar to your project. Add some server runtime to your Eclipse and then associate project with that runtime (as explained in the Kenster link). It will fix the issue you have. – Gas Jan 05 '15 at 22:11