These procedures assume that you are running a domain with developer profile.
The Hello application is contained in a Web ARchive (WAR) file in the samples/quickstart directory. Packaged applications can also be in the form of a Java ARchive (JAR) or Enterprise ARchive (EAR) file.
Alternatively, you can download this application from https://glasfish.dev.java.net/downloads/quickstart/hello.war.
Copying to a domain’s autodeploy directory lets you put a pre-packaged application into use immediately, with minimal effort.
Find as-install/samples/quickstart/hello.war or download from https://glasfish.dev.java.net/downloads/quickstart/hello.war.
Copy hello.war to the as-install/domains/domain1/autodeploy/ directory.
On Windows, you can create a shortcut to the autodeploy directory on your desktop, and then drag and drop the hello.war file onto the shortcut.
When the server has finished deploying the application, it creates a file named hello.war_deployed in the autodeploy directory. Depending on the speed of your system, the process can take a few seconds. Until that file appears, a 404-File Not Found error occurs when you try to visit the application page.
Access this URL to visit the application page: http://hostname:HTTPport/hello.
You see the application’s first page, which prompts you to fill in your name:
Type your name and click Submit.
The application displays a customized response, giving you a personal Hello.
Open the Admin Console in a web browser if you have not done so already.
In the left pane, click the Applications node to expand it.
Click Web Applications.
You can see the list of deployed web applications, if any.
You can use the Hello application bundled with the Enterprise Server or you upload the sample you have downloaded from https://glassfish.dev.java.net/downloads/quickstart/hello.war. Do one of the following:
If you have downloaded the Hello application, click Browse in the Packaged File to Upload text box. Navigate to the directory to which you have downloaded the application.
The application appears in the Web Applications list.
To verify that it was deployed properly, in the Web Applications page, select the Hello application and click Launch.
You can deploy applications using the asadmin deploy command. You can also use the asant commands for deployment. For detailed information on deploying applications see the Sun GlassFish Communications Server Application Deployment guide.