Say I have a Java web project and I need to place a couple of JARs into the WEB-INF/lib directory. In Eclipse, if you simply place those JARs there, Eclipse picks them up as on the classpath. However, IntelliJ doesn't seem to.
What is the correct way of adding those JARs into the project such that they are in the standard WEB-INF/lib directory?
In the Project Structure window, after adding the JAR in the section "Libraries", you can go to the section "Artifacts" and you'll see in the register "Output Layout" how the WEB-INF folder will look like. On the right side you see "Available Elements", which you can drag&drop to the left site into the lib folder.