This section provides information for administrators who want to start and verify the Application Server software:
For administration tasks, the Application Server software provides these tools, which enable administrators to manage server instances:
The asadmin utility, a command-line tool
The Admin Console, a browser-based graphical user interface (GUI)
You start the server by starting the domain. A domain provides authentication and administration for the server instance that belongs to it. Starting the domain starts the server instance in the domain. A default domain called domain1 is created when you install Application Server.
A default domain does not get created in certain distributions (such as the Application Server bundled with Solaris 10 distributions). If a default domain has not been created, use the create-domain command to create an administrative domain. See create-domain(1).
To start the server, follow the steps below. Solaris and Linux steps are in the first column and Windows steps are in the second column:
Solaris and Linux
From the Start menu, choose Programs ⇒ Sun Microsystems ⇒ Application Server PE⇒ Start Default Server.
When the server has completed startup, this message appears: Domain domain1 is ready to receive client requests. Additional services are being started in the background.
To verify that the server is running on your system, access this URL: http://localhost:8080.
The URL has two parts:
The name localhost refers to the system on which the browser is currently running. If the Application Server is running on another system, substitute the name of that system in the URL.
The default port number is 8080. If you changed the port number during installation, use that number in your browser’s address field instead.
You should see the server Welcome page, shown below.
This might take a few seconds to display as the server completes initialization.
When you see this page, you know that the server is running. If the server is not running, but your system is operating normally, you get a server not found error. (In some browsers, that error automatically launches a search engine.) For other problems, you might need to check your server and browser settings, as described in the Sun Java System Application Server Platform Edition 8.2 Troubleshooting Guide.
Later on, to stop the server, follow the steps below. Solaris and Linux steps are in the first column, and Windows steps are in the second column:
Solaris and Linux
From the install-dir/bin directory, type this command:
From the Start menu, choose Programs ⇒ Sun Microsystems ⇒ Application Server PE ⇒ Stop Default Server.
The server installation includes a pre-packaged application that says “Hello,” taken from The J2EE 1.4 Tutorial. The Hello web application is contained in a Web ARchive (WAR) file in the samples directory. Packaged applications can also be in the form of a Java ARchive (JAR) or Enterprise ARchive (EAR) file.
Dragging or copying to a domain’s autodeploy directory lets you put a pre-packaged application into use immediately, with minimal effort.
Copy it to install-dir/domains/domain1/autodeploy/.
On Windows, you can create a shortcut to the autodeploy directory on your desktop, 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://localhost:8080/hello.
You should now see the application’s first page, which prompts you to fill in your name:
Type your name and click Submit.
You should now see the customized response, giving you a personal Hello.
You can also use the asadmin command-line utility to deploy from the command line or in a shell script. The command is asadmin deploy. For more information, see the deploy command documentation in the Sun Java System Application Server Platform Edition 8.2 Reference Manual.
Other deployment methods are discussed later in the Guide in To Deploy From the Admin Console, and To Deploy From a Development Directory. It is also possible to dynamically reload changes to your application. For more information, see To configure dynamic reloading in Sun Java System Application Server Platform Edition 8.2 Administration Guide.
The Admin Console is a web-based interface that simplifies a variety of administration and configuration tasks. It is commonly used to accomplish the following:
Deploy and undeploy applications
Enable and disable applications
Identify which applications are currently running
Configure Java DataBase Connectivity (JDBCTM) resources and other server settings
Select and view recent entries in the log file
For further information about using the Admin Console, consult the online help or the Sun Java System Application Server Platform Edition 8.2 Administration Guide.
The localhost variable is the name of the system that the browser is currently running on. If Application Server software is running on another system, substitute the name of that system for localhost.
4848 is the Admin Console’s default port number. If you changed the port number during the installation, use that number instead.
Windows users can also use the Start menu option: Programs ⇒ Sun Microsystems ⇒ Application Server PE ⇒Admin Console.
When the Login window appears, enter the admin user name and password.
Click Log In.
When the Admin Console appears, it looks like this:
Use the options at the top of the information panel to configure a variety of operational settings for Application Server software.
To see the server’s log file, click “Search Log Files” under the Common Tasks heading in the right pane. When the Log Viewer window appears, you can see status messages from the server and output from your J2EE application.
You have successfully completed the first section of the Quick Start Guide. You started the Application Server, deployed the Hello application, and viewed the Admin Console. To continue with the Quick Start tasks, go on to Packaging and Deploying Applications.