The first time I used IntelliJ IDEA, I have the same problem, but I think the principle should be like Eclipse, just configure our required jar file in an external library.
Go to "File" ----> "Project Structure" ----> "Library", then press the ➕ button and add the necessary jar.
Cannot find the Servlet, it seems that you have lost the server-api.jar file, just put it in your library. And if you want to build a j2ee project, this simple file does not make sense.
So just put the whole local tomcat / lib jar file in your project, and the function will be the same as eclipse (configure build path → runtime server ...).
Crabime
source share