A web module is essentially a special filesystem that represents a deployment structure. Using the IDE, you can create a web module from scratch, create a web module from a WAR (web module archive) file, import a web module directory that conforms to the deployment structure, and change a directory structure into a web module.
In order to execute or debug a JSP page or servlet in the IDE, you must place it within a web module.