To Install GlassFish Server Using the ZIP File
To Start the GlassFish Server Using NetBeans IDE
You can also manage Glassfish Server startup events as follows,
You can start and stop GlassFish Server using either NetBeans IDE or the command line....Starting and Stopping GlassFish Server
In the Services window, expand the Servers node. If a green arrow icon appears on the GlassFish V2 node, the server is running.
To Add GlassFish Server as a Server in NetBeans IDE
How To Change Port Number Of GlassFish
Choose Start->Programs->Oracle GlassFish Server->Uninstall.
I had the exact same problem and the way I solved it was to delete the glassfish, tomcat7 and tomcat 8 servers from my IDE. I then deleted their folders on my hard disk and reinstalled the glassfish alone. Everything worked fine after that. If Netbeans is blocked by Firewall this happens.
Choose Start>Programs>Oracle GlassFish Server>Uninstall. Windows systems, from the command line: Double-click the uninstall.exe file. On Windows you can also start the uninstaller by typing the file name at the command prompt.
After installing Glassfish Server and create the default domain (domain1),you can create additional domains by using local create-domain subcommand. This subcommand creates the configuration of domain. The asadmin utility on a givensystem can create a domain and store the domain configuration in a folderof choice.
Restart Netbeans. On the project view (default left side of the screen), go to services, right click on Servers and then "Add Server" Select Apache Tomcat, enter username and password and config the rest and finish.
2. How to Install Tomcat and Get Started with Java Servlet Programming
Starting of Tomcat failed from Netbeans
CATALINA_HOME is the folder where Apache Tomcat is installed e.g. c:\program files\Apache Tomcat or /usr/apache/tomcat . It is the folder where you unzip Tomcat in the first place (when you install from zip). ... For instance log files are written inside CATALINA_HOME/logs .
By default, CATALINA_HOME is /usr/share/tomcat6 , and CATALINA_BASE is /var/lib/tomcat6 .
For Unix-based systems, these are standard shells scripts, with the extension ". sh". ... "Catalina" is the script that is actually responsible for starting Tomcat; the "startup" script simply runs "catalina" with the argument "start" ("catalina" also can be used with the "stop" parameter to shut down Tomcat).
Apart from CATALINA_HOME and CATALINA_BASE, all environment variables can be specified in the "setenv" script. The script is placed either into CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named setenv. bat (on Windows) or setenv.sh (on *nix). The file has to be readable.
CATALINA_HOME represents the root of your Tomcat installation. Optionally, Tomcat may be configured for multiple instances by defining $CATALINA_BASE for each instance. If multiple instances are not configured, $CATALINA_BASE is the same as $CATALINA_HOME . See: Apache Tomcat 7 - Introduction.
One can do using command prompt:
To install an instance, first set the CATALINA_HOME environment variable to the name of the Tomcat installation directory. Then create a second environment variable CATALINA_BASE and point this to the instance folder. Then run "service install" command specifying a service name.
Its located user /usr/share/tomcat7/lib folder. If you have used apt-get install tomcat7 command for installing your container.
This appendix describes how to start and stop the Tomcat server from a command line prompt as follows: