Sun Java System Application Server Platform Edition 8.2 Quick Start Guide

Starting and Verifying the Server

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:

Starting the Application Server

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 –

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 

Windows 

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

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

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

Confirming That the Server Is Running

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:

You should see the server Welcome page, shown below.

Page verifying that Application Server is up and running.

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 

Windows 

From the install-dir/bin directory, type this command:

asadmin stop-domain

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

Deploying the Hello Application

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.

ProcedureTo Deploy Using Autodeploy

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

  2. Copy it to install-dir/domains/domain1/autodeploy/.


    Tip –

    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.

  3. 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:

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

    You should now see the 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 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.


Using 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 accomplish the following:

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.

ProcedureTo Log In to the Admin Console

  1. Access http://localhost:4848.

    • 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.


    Tip –

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


  2. When the Login window appears, enter the admin user name and password.

  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 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.

Next Steps

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.