I faced a similar issue when I tried to run my project in NetBeans. A login to Tomcat Manager Application window appeared, prompting me for a username and password, with default values pre-filled. However, the window would not disappear, and the execution of the file failed. A red error line indicated that the port 8080 was not working. I realized that this was because I also had XAMPP installed, which was using the same port number. To resolve the issue, I uninstalled XAMPP, reopened NetBeans, and ran the application again. This time, the login window appeared, but after clicking "OK," it disappeared, and my project ran successfully. In conclusion, if you already have XAMPP installed, you can still fix this issue by ensuring there is no port conflict or directly uninstalling the XAMPP server.