NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide

Migrating to NSJSP 6.1
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide596210-006
7-23
Considerations for Migrating Web Applications from
NSJSP 5.0 to NSJSP 6.1
migration. Also, the Admin Web and Manager Web applications provide the same
functionality in NSJSP 5.0 and in NSJSP 6.1. As a result, there is no need to migrate
these applications from NSJSP 5.0 to NSJSP 6.1.
Application Modifications
This section discusses the modifications related to applications that you must consider
while migrating from NSJSP 5.0 to NSJSP 6.1.
The Logger element
The following are the differences between NSJSP 5.0 and NSJSP 6.1:
Logging in NSJSP 5.0 was configured using the Logger element. If the application
that you want to migrate to NSJSP 6.1 has a context explicitly defined in the
META-INF/context.xml file, and if the context definition includes a Logger
element, you must remove the Logger element because NSJSP 6.1 does not
support the Logger element. Logging in NSJSP 6.1 is handled by the JULI
framework. If the application that you want to migrate to NSJSP 6.1 contains a
Logger element, you must explicitly define logging for the application.
In NSJSP 6.1, you can define application-specific logging using the
logging.properties file. Equivalent attributes of the directory and the prefix
attributes of the Logger element are available in the Handler configuration in JULI.
The suffix attribute of the Logger has no equivalent in JULI.
The Logger element offers the timestamp attribute option to specify the date and
time at which the log message is written. In JULI, the default behavior is to log all
messages with a timestamp.
The format in which the messages are logged can be configured using the format
attribute of the Handler. For more information on the Handler component and how
to configure Handlers, see Chapter 5, Logging in NSJSP
.
The Logging API
If the application uses the log method of the javax.servlet.ServletContext
interface to log application messages, you need not make any changes to the
application with respect to the Logging API.
If the application uses a custom logging implementation, such as Log4J, you need not
make any changes to the application.
NSJSP 5.0 is bundled with the Apache Commons Logging (commons-logging-
api.jar is located in the <NSJSP_HOME>/bin folder). All the internal classes of
NSJSP use the LogFactory and Log classes of Commons Logging. In NSJSP 6.1,
they are replaced by the LogFactory and the Log classes in the JULI framework.
Although similar to the NSJSP 5.0 classes, the NSJSP 6.1 LogFactory and Log
classes are bundled in a different Java package. If the application uses these classes,
you must change the package definition from org.apache.commons.logging to
org.apache.juli.logging.