javax.servlet.ServletException cannot be resolved to a type in spring web app

user2238980 picture user2238980 · Apr 3, 2013 · Viewed 105.5k times · Source

I am developing web app using spring frame work, but i am getting following error in some of the jsp pages.

javax.servlet.ServletException cannot be resolved to a type

I have included servlet-api also but still same error message is displaying. How to over come this problem?

Answer

Kishan_KP picture Kishan_KP · Apr 3, 2013

I guess this may work, in Eclipse select your project → then click on project menu bar on top → goto to properties → click on Targeted Runtimes → now you must select a check box next to the server you are using to run current project → click Apply → then click OK button. That's it, give a try.