First, download GlassFish Server
Download the appropriate version from the following address:
Http://glassfish.java.net/public/downloadsindex.html
Http://www.oracle.com/technetwork/java/javaee/downloads/ogs-3-1-1-downloads-439803.html
Second, Eclipse install GlassFish Server plugin
On the main menu bar of Eclipse--window--prefrences--server--runtime environments, open the Servers control window.
Right-clicking on the Servers Control window, add--dowload additionl Server adapters The application server list will be loaded, wait a moment, select Oracle GlassFish Server Tools to double-click to install.
iii. Eclipse GlassFish Server configuration
Right-click on the first step into the servers, add-glassfish--GlassFish Server Open Source Edition 3 (Java EE 6), and next, for example.
Note: Application Server directory for you to download GlassFish, unzip the directory
Iv. deployment of the project
Right-click on the project name-"Run as-" run on Server Select GlassFish Server Click Finish
v. GlassFish Server startup
In fact, the fourth to fifth step is the same as other application servers, when the GlassFish server starts successfully, the following information is printed on the console, stating that GlassFish server started successfully
Java code
- Wait for the DAS to start ....... ....... ............
- Domain started: domain1
- Domain Location: E:\work\glassfish-3.0. 1-ml\glassfishv3\glassfish\domains\domain1
- Log file: E:\work\glassfish-3.0. 1-ml\glassfishv3\glassfish\domains\domain1\logs\server.log
- Management port for domain: 4848
- Command Start-domain has been executed successfully.
Project default port is 8080, you can access your project by http://localhost:8080/project name
Access: http://localhost:4848 to GlassFish Server Management configuration
Eclipse GlassFish Server Configuration