Eclipse Java EE can not find javax.servlet?

2

I am setting up a new server, as always in a Eclipse Mars (4.5.2) Eclipse Java EE IDE for Web Developers , I had a problem with the installation of the server, I deleted it and found this bug that is already fixed, but now, when importing the base of the project He tells me ...

The import javax.servlet cannot be resolved

I know I can import the library manually ... but taking into account that I have the right eclipse, it does not have to be done, besides that it would give me future problems ....

    
asked by Jordi Castilla 11.05.2016 в 09:40
source

1 answer

2

Solved ... :S . I put it here in case someone happens in the future (I never had this happen to me).

NOTE: you must have Eclipse Java EE installed, but do not try this solution !!!

The previous failed installation of the tomcat that took me to the bug it had been stuck in the eclipse settings ( that happens to delete the tomcat by hand ).

In Project Properties > Targeted runtimes was my old tomcat installation (the one that no longer existed) selected and the new one unchecked:

NOTE: when I re-enter to make the capture it only shows the valid tomcat, but the first time I entered there were 2 instances of tomcat and the incorrect one was marked! Although if you uncheck the good one, you can reproduce the error. :)

    
answered by 11.05.2016 / 09:50
source