0

First I got a error

"The import javax.servlet.annotation cannot be resolved"

..So I have added servlet-api.jar file into my libraries. After adding this jar file, I am getting

"Server Tomcat v7.0 Server at localhost failed to start."

error when starting the server.

When I remove the servlet-api.jar file, tomcat server is starting perfectly and I am getting

servlet.annotation error

again.

Please help me in resolving this error. I have seen into some similar posts but did not find it useful.

Konrad Krakowiak
  • 12,285
  • 11
  • 58
  • 45
  • Tomcat provides a `servlet-api` library specific for its version in `tomcat/lib`so your project does not have to provide it. Add tomcat to your project as `targeted runtime` in project preferences of Eclipse. – Fran Montero May 25 '15 at 06:31
  • Thanks for the reply. I have removed servlet-api library and added tomcat as targeted runtimes. Now am not getting servlet.annotation error but i can't start tomcat. – harish reddy May 25 '15 at 06:59
  • could you post tomcat start trace error? – Fran Montero May 25 '15 at 07:10

0 Answers0