Sun Java System Application Server Platform Edition 9 Quick Start Guide

Starting and Verifying the Server

This section provides procedures 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:

ProcedureTo Start the Application Server on Linux and Solaris

You may have already started the server when you installed, using the Start Server button on the last installation screen. However, if your server is not running, start it using the steps below.

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.


Note –

If you are using the Application Server that comes bundled with the Solaris operating system, no default domain is created. Instead, you must create one using asadmin create-domain. See the documentation for create-domain(1) for more information.



Note –

If you are using the Ubuntu Linux version of the server, a default domain is created in /var/lib/sunappserver/domains. You can administer this domain using the install-dir/bin/asadmin command. If you do not have root access or you want to have domains running in your home directory, you can use the asadmin convenience wrapper script located in /usr/bin to create a domain in your home directory. Running asadmin start-domain from the convenience script creates and starts the domain. For more information on the convenience script, type asadmin man at the command prompt.

If you have root access, you can also create and start domains using the asadmin commands create-domain and start-domain from the install-dir/bin directory. These domains are created by default in /var/lib/sunappserver/domains. For more information on create-domain and start-domain, see the asadmin help.


  1. Add the install-dir/bin/ directory to the PATH environment variable.

  2. Start the server by entering this command: asadmin start-domain domain1.

    When the server has started, a message appears stating that the server has been started and is ready to receive requests. The output also includes information on ports used by the Application Server.

ProcedureTo Start the Application Server on Windows

You may have already started the server when you installed, using the Start Server button on the last installation screen. However, if your server is not running, start it using the steps below.

  1. From the Start menu, choose Programs ⇒ Sun Microsystems ⇒ Application Server PE 9 ⇒ Start Default Server.

    A command window appears showing initialization messages. When the server has started, a message appears stating that the server has been started and is ready to receive requests. The output also includes information on ports used by the Application Server.

  2. Press any key to dismiss the command window.

See Also

You can also use the asadmin start-domain domain1 command to start the server. Before using asadmin, see To Configure the Windows Environment to Use the Command-Line Tools.

ProcedureTo Confirm That the Server Is Running

    To verify that the server is running on your system, click this URL: http://localhost:8080.

    The URL has two parts:

    • localhost is used if the both the browser and the Application Server are running on the same system. 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. The port number is displayed in the asadmin start-domain output.

      You should see the server Welcome page, shown below.

      Page verifying that the server is up and running.

      This page might take a few seconds to appear.

      When you see this page, you know that the server is running. If you encounter problems, check your server and browser settings, as described in the Sun Java System Application Server Platform Edition 9 Troubleshooting Guide.

ProcedureTo Deploy the Hello Application Using Autodeploy

The server installation includes a pre-packaged application that says “Hello,” taken from The Java EE 5 Tutorial. The Hello 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.

  1. Find install-dir/samples/quickstart/hello.war.

  2. Copy hello.war to the install-dir/domains/domain1/autodeploy/ directory.


    Tip –

    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.

  3. Access this URL to visit the application page: http://localhost:8080/hello.

    You see the application’s first page, which prompts you to fill in your name:

    Displays message: Hi, my name is Duke. What's yours?
  4. Type your name and click Submit.

    The application displays a customized response, giving you a personal Hello.


    Note –

    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(1) command documentation in the Sun Java System Application Server Platform Edition 9 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 Dynamic Reloading in Sun Java System Application Server Platform Edition 9 Application Deployment Guide.


ProcedureTo Log In to the Admin Console

The Admin Console is a web-based interface that simplifies a variety of administration and configuration tasks. It is commonly used to:

For further information about using the Admin Console, consult the online help or the Sun Java System Application Server Platform Edition 9 Administration Guide.

  1. Access http://localhost:4848/.

    • localhost is used if the both the browser and the Application Server are running on the same system. If the Application Server is running on another system, substitute the name of that system in the URL.

    • 4848 is the Admin Console’s default port number. If you changed the port number during the installation, use that number instead. The port number is included in the output for asadmin start-domain.


    Tip –

    Windows users can also use the Start menu option: Programs ⇒ Sun Microsystems ⇒ Application Server PE 9 ⇒Admin Console.


  2. Enter the administration user name and password, specified when you installed the product.

  3. Click Log In.

    When the Admin Console appears, it looks like this:

    Admin Console home page. Left pane shows server tree
and right pane shows common tasks and product information links.

    Use the items in the tree to configure a variety of operational settings for Application Server software. Launch online help from the button in the upper right corner.

    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, set criteria and click Search to display status messages from the server and output from your Java EE application.

ProcedureTo Start the Bundled Java DB Server

The Application Server includes a bundled Java DB server. To start it, use the following procedure:

  1. Make sure that you are logged in as the user that installed the database.

  2. Run asadmin start-database.

    For more information on the start-database command, see the command's help or the start-database(1) information in Sun Java System Application Server Platform Edition 9 Reference Manual.