Download
FAQ History |
API
Search Feedback |
Sun Java System Application Server Platform Edition 8
The Sun Java System Application Server Platform Edition 8 is a fully compliant implementation of the J2EE 1.4 platform. In addition to supporting all the APIs described in the previous sections, the Application Server includes a number of J2EE technologies and tools that are not part of the J2EE 1.4 platform but are provided as a convenience to the developer.
This section briefly summarizes the technologies and tools that make up the Application Server, and instructions for starting and stopping the Application Server, starting the Admin Console, starting
deploytool
, and starting and stopping the PointBase database server. Other chapters explain how to use the remaining tools.Technologies
The Application Server includes two user interface technologies--JavaServer Pages Standard Tag Library and JavaServer Faces--that are built on and used in conjunction with the J2EE 1.4 platform technologies Java servlet and JavaServer Pages.
JavaServer Pages Standard Tag Library
The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many JSP applications. Instead of mixing tags from numerous vendors in your JSP applications, you employ a single, standard set of tags. This standardization allows you to deploy your applications on any JSP container that supports JSTL and makes it more likely that the implementation of the tags is optimized.
JSTL has iterator and conditional tags for handling flow control, tags for manipulating XML documents, internationalization tags, tags for accessing databases using SQL, and commonly used functions.
JavaServer Faces
JavaServer Faces technology is a user interface framework for building Web applications. The main components of JavaServer Faces technology are as follows:
- A GUI component framework.
- A flexible model for rendering components in different kinds of HTML or different markup languages and technologies. A
Renderer
object generates the markup to render the component and converts the data stored in a model object to types that can be represented in a view.- A standard
RenderKit
for generating HTML/4.01 markup.The following features support the GUI components:
All this functionality is available via standard Java APIs and XML-based configuration files.
Tools
The Application Server contains the tools listed in Table 1-1. Basic usage information for many of the tools appears throughout the tutorial. For detailed information, see the online help in the GUI tools and the man pages at
http://docs.sun.com/db/doc/817-6092
for the command-line tools.
Table 1-1 Application Server Tools Component Description Admin Console A Web-based GUI Application Server administration utility. Used to stop the Application Server and manage users, resources, and applications.asadmin
A command-line Application Server administration utility. Used to start and stop the Application Server and manage users, resources, and applications. asant A portable command-line build tool that is an extension of the Ant tool developed by the Apache Software Foundation (seehttp://ant.apache.org/
).asant
contains additional tasks that interact with the Application Server administration utility.appclient
A command-line tool that launches the application client container and invokes the client application packaged in the application client JAR file.capture-schema
A command-line tool to extract schema information from a database, producing a schema file that the Application Server can use for container-managed persistence.deploytool
A GUI tool to package applications, generate deployment descriptors, and deploy applications on the Application Server.package-appclient
A command-line tool to package the application client container libraries and JAR files. PointBase database An evaluation copy of the PointBase database server.verifier
A command-line tool to validate J2EE deployment descriptors.wscompile
A command-line tool to generate stubs, ties, serializers, and WSDL files used in JAX-RPC clients and services.wsdeploy
A command-line tool to generate implementation-specific, ready-to-deploy WAR files for Web service applications that use JAX-RPC.
Starting and Stopping the Application Server
To start and stop the Application Server, you use the
asadmin
utility. To start the Application Server, open a terminal window or command prompt and execute the following:A domain is a set of one or more Application Server instances managed by one administration server. Associated with a domain are the following:
You specify these values when you install the Application Server. The examples in this tutorial assume that you choose the default ports.
With no arguments, the
start-domain
command initiates the default domain, which is domain1. The--verbose
flag causes all logging and debugging output to appear on the terminal window or command prompt (it will also go into the server log, which is located in<
J2EE_HOME
>/domains/domain1/logs/server.log
).Or, on Windows, you can choose
ProgramsSun MicrosystemsJ2EE 1.4 SDKStart Default Server
After the server has completed its startup sequence, you will see the following output:
To stop the Sun Java System Application Server, open a terminal window or command prompt and execute
Or, on Windows, choose
ProgramsSun MicrosystemsJ2EE 1.4 SDKStop Default Server
When the server has stopped you will see the following output:
Starting the Admin Console
To administer the Application Server and manage users, resources, and J2EE applications, you use the Admin Console tool. The Application Server must be running before you invoke the Admin Console. To start the Admin Console, open a browser at the following URL:
On Windows, from the Start menu, choose
ProgramsSun MicrosystemsJ2EE 1.4 SDKAdmin Console
Starting the deploytool Utility
To package J2EE applications, specify deployment descriptor elements, and deploy applications on the Sun Java System Application Server, you use the
deploytool
utility. To startdeploytool
, open a terminal window or command prompt and executeOn Windows, from the Start menu, choose
ProgramsSun MicrosystemsJ2EE 1.4 SDKDeploytool
Starting and Stopping the PointBase Database Server
To start the PointBase database server, follow these steps.
On Windows, from the Start menu, choose
ProgramsSun MicrosystemsJ2EE 1.4 SDKStart PointBase
To stop the PointBase server, follow these steps.
On Windows, from the Start menu, choose
ProgramsSun MicrosystemsJ2EE 1.4 SDKStop PointBase
Debugging J2EE Applications
This section describes how to determine what is causing an error in your application deployment or execution.
Using the Server Log
One way to debug applications is to look at the server log in
<
J2EE_HOME
>/domains/domain1/logs/server.log
. The log contains output from the Application Server and your applications. You can log messages from any Java class in your application withSystem.out.println
and the Java Logging APIs (documented athttp://java.sun.com/j2se/1.4.2/docs/guide/util/logging/index.html
) and from Web components with theServletContext.log
method.If you start the Application Server with the
--verbose
flag, all logging and debugging output will appear on the terminal window or command prompt and the server log. If you start the Application Server in the background, debugging information is only available in the log. You can view the server log with a text editor or with the Admin Console log viewer. To use the log viewer:If you wish to display other entries:
Using a Debugger
The Application Server supports the Java Platform Debugger Architecture (JPDA). With JPDA, you can configure the Application Server to communicate debugging information via a socket. In order to debug an application using a debugger:
- Enable debugging in the Application Server using the Admin Console as follows:
- Select the Application Server node.
- Select the JVM Settings tab. The default debug options are set to:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,
suspend=n,address=1044As you can see, the default debugger socket port is 1044. You can change it to a port not in use by the Application Server or another service.
- Check the Enabled box of the Debug field.
- Click the Save button.
- Stop the Application Server and then restart it.
- Compile your Java source with the
-g
flag.- Package and deploy your application.
- Start a debugger and connect to the debugger socket at the port you set when you enabled debugging.
Download
FAQ History |
API
Search Feedback |
All of the material in The J2EE(TM) 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.