I have Tomcat 8.0.15.0, Glassfish 4.1 and NetBeans 8.0.2 installed on my PC, which I installed simultaneously from Netbeans.org.
All three don't seem to be working together well on my PC as the following problem scenario illustrates:
With Netbeans inactive, I ran startup.bat from the Tomcat Program/bin folder and Tomcat page appeared on Web at http://localhost:8080 as expected.
I then created a project FirstServlet in NetBeans using the Tomcat library where I coded a servlet. When I run the project I get the following error message:
C:\Users\Jon\Documents\NetBeansProjects\FirstServletApp\nbproject\build-impl.xml:1045: Deployment error: Starting of Tomcat failed.
I created a second project with a different name and identical functionality using the Glassfish library. but when I tried to run, I got the error message:
Could not start GlassFish Server 4.1: HTTP or HTTPS listener port is occupied while server is not running.
I then ran shutdown.bat from Tomcat Program/bin folder and returned to NetBeans and was able to run the second project successfully and on the Web the Glasssish page appears on http://localhost:8080.
How I can set things up so I can create projects using either Tomcat or Glassfish library in NetBeans and can successfully run both?