BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   BEA WebLogic Server 6.0 Release Notes :   Previous topic   |   Next topic   |   Contents   

 

Migrating WebLogic Server Applications to Version 6.0

 

The following sections describe a list of issues you need to consider when migrating your applications from WebLogic Server Version 4.5 or 5.1 to WebLogic Server Version 6.0. For a more detailed procedure, see the Migration Tutorial on BEA dev2dev. Where indicated, additional details are provided in the feature-specific documents:

Java2 Enterprise Edition (J2EE)

The following sections discuss migration issues for each of the J2EE services. In conformance with the J2EE specification, WebLogic 6.0 deploys applications as one or more of the following types:

Each of the above application types have their own deployment descriptors and directory format. If you are using legacy applications that were used with WebLogic Server 4.5 or WebLogic Server 5.1, you may need to make changes in order to migrate them successfully to WebLogic Server 6.0. This includes creating XML deployment descriptors and arranging resources according to a prescribed directory format. There is no longer a weblogic.properties file in WebLogic Server 6.0. The configuration of your applications is handled through the WebLogic Server Administration Console and configuration information is stored in an XML file.

The following sections contain information on converting your existing weblogic.properties files to the new XML format and converting your existing applications to the appropriate J2EE application type.

Converting weblogic.properties to .xml files

Earlier releases of WebLogic Server used a weblogic.properties file to configure applications. In WebLogic 6.0, configuration of applications is handled through XML descriptor files and the Administration Console. Converting a weblogic.properties file from an earlier version of WebLogic Server creates a new domain for your applications and adds .xml files that define how your applications are set up. Convert your weblogic.properties file to the appropriate .xml files by following these steps:

  1. Start the default WebLogic Server 6.0 server and the default WebLogic 6.0 Administration Console. For information on starting WebLogic Server 6.0, see Post-Installation Tasks.

  2. At the home page for the WebLogic Administration Console (for example: http://localhost:7001/console/index.jsp) click on the Convert weblogic.properties link under the heading Getting Started.

  3. Use the links to navigate the server's file system and find the root of your previous version of WebLogic Server (For example: C:/weblogic). When you have found the correct directory, click on the icon next to it to select it.

  4. If you have additional per server weblogic.properties files or clustering weblogic.properties files select them using the provided windows. If you have chosen the correct root directory, your global weblogic.properties file will be converted regardless of any additional properties files that you select.

  5. Select a name for your new domain. When you have chosen a new name for your domain, click Convert.

Throughout this document, the directory of the new domain you have created is referred to as domainName. The default domain that is provided with the original installation of WebLogic Server 6.0 is called mydomain and is located in the wlserver6.0/config/ directory. It is necessary to set up your new domain before migrating any applications.

WebLogic Properties Mapping

The weblogic.properties file is no longer supported. Earlier releases of WebLogic Server used a weblogic.properties file to configure applications. In WebLogic Server 6.1, configuration of applications is handled through XML descriptor files and the Administration Console. If the attribute can be configured in the Administration Console, the table shows the navigation path to the attribute

The table below shows which config.xml attribute handles the function formerly performed by which weblogic.properties property. weblogic.properties Mapping Table

"weblogic.properties" file Property

Configuration Attribute

Console Navigation

weblogic.administrator.email

config.xml:
EmailAddress

(Administrator element)

weblogic.administrator.location

config.xml:
Notes (freeform, optional)

(Administrator element)999

weblogic.administrator.name

config.xml:
Name

(Administrator element)

weblogic.administrator.phone

config.xml:
PhoneNumber

(Administrator element)

weblogic.cluster.defaultLoadAlgorithm

config.xml:
DefaultLoadAlgorithm

(Cluster element)

Cluster: General: Default Load Algorithm

weblogic.cluster.multicastAddress

config.xml:
MulticastAddress

(Cluster element)

Cluster: General: Multicast Address

weblogic.cluster.multicastTTL

config.xml:
MulticastTTL

(Cluster element)

Cluster: Multicast: MulticastTTL

weblogic.cluster.name

config.xml
ClusterAddress

(Cluster element)

Cluster:General: Name

weblogic.httpd.authRealmName

config.xml:
AuthRealmName

(WebAppComponent element)

weblogic.httpd.charsets

config.xml:
Charsets

(WebServer element)

weblogic.httpd.clustering.enable

config.xml:
ClusteringEnabled

(WebServer element)

weblogic.httpd.defaultServerName

config.xml
DefaultServerName

(WebServer element)

weblogic.httpd.defaultWebApp

config.xml:
DefaultWebApp

(WebServer element)

weblogic.httpd.enable

config.xml:
HttpdEnabled

(Server element)

weblogic.httpd.enableLogFile

config.xml:
LoggingEnabled

(WebServer element)

weblogic.httpd.http.keepAliveSecs

config.xml:
KeepAliveSecs

(WebServer element)

weblogic.httpd.https.keepAliveSecs

config.xml:
HttpsKeepAliveSecs

(WebServer element)

weblogic.httpd.indexDirectories

config.xml:
IndexDirectoryEnabled

(WebAppComponent element)

weblogic.httpd.keepAlive.enable

config.xml:
KeepAliveEnabled

(WebServer element)

weblogic.httpd.logFileBufferKBytes

config.xml:
LogFileBufferKBytes

(WebServer element)

weblogic.httpd.logFileFlushSecs

config.xml:
LogFileFlushSecs

(WebServer element)

weblogic.httpd.logFileFormat

config.xml:
LogFileFormat

(WebServer element)

weblogic.httpd.logFileName

config.xml:
LogFileName

(WebServer element)

weblogic.httpd.logRotationPeriodMins

config.xml:
LogRotationTimeBegin

(WebServer element)

weblogic.httpd.logRotationPeriodMins

config.xml:
LogRotationPeriodMins

(WebServer element)

weblogic.httpd.logRotationType

config.xml:
LogRotationType

(WebServer element)

weblogic.httpd.maxLogFileSizeKBytes

config.xml:
MaxLogFileSizeKBytes

(WebServer element)

weblogic.httpd.mimeType

web.xml:
mime-type

<mime-mapping> element

weblogic.httpd.postTimeoutSecs

config.xml:
PostTimeoutSecs

(WebServer element)

weblogic.httpd.servlet.extensionCaseSensitive

config.xml:
ServletExtensionCaseSensitive

(WebAppComponent element)

weblogic.httpd.servlet.reloadCheckSecs

config.xml:
ServletReloadCheckSecs

(WebAppComponent element)

weblogic.httpd.servlet.SingleThreadedModelPoolSize

config.xml:
SingleThreadedServletPoolSize

(WebAppComponent element)

weblogic.httpd.session.cacheEntries

weblogic.xml:
CacheSize

<param-name>/<param-value> element pair

weblogic.httpd.session.cookie.comment

weblogic.xml:
CookieComment

<param-name>/<param-value> element pair

weblogic.httpd.session.cookie.domain

weblogic.xml:
CookieDomain

<param-name>/<param-value> element pair

weblogic.httpd.session.cookie.maxAgeSecs

weblogic.xml:
CookieMaxAgeSecs

<param-name>/<param-value> element pair

weblogic.httpd.session.cookie.name

weblogic.xml:
CookieName

<param-name>/<param-value> element pair

weblogic.httpd.session.cookie.path

weblogic.xml:
CookiePath

<param-name>/<param-value> element pair

weblogic.httpd.session.cookies.enable

weblogic.xml:
CookiesEnabled

<param-name>/<param-value> element pair

weblogic.httpd.session.debug

weblogic.xml:
SessionDebuggable
<param-name>/<param-value> element pair

weblogic.httpd.session.enable

weblogic.xml:
SessionTrackingEnabled

<param-name>/<param-value> element pair

weblogic.httpd.session.invalidationintervalSecs

weblogic.xml:
InvalidationIntervalSecs

<param-name>/<param-value> element pair

weblogic.httpd.session.jdbc.connTimeoutSecs

weblogic.xml:
JDBCConnectionTimeoutSecs

<param-name>/<param-value> element pair

weblogic.httpd.session.persistentStoreDir

weblogic.xml:
PersistentStoreDir

<param-name>/<param-value> element pair

weblogic.httpd.session.persistentStorePool

weblogic.xml:
PersistentStorePool

<param-name>/<param-value> element pair

weblogic.httpd.session.persistentStoreShared

weblogic.xml:
SessionPersistentStoreShared

<param-name>/<param-value> element pair

weblogic.httpd.session.persistentStoreType

weblogic.xml:
PersistentStoreType

<param-name>/<param-value> element pair

weblogic.httpd.session.sessionIDLength

weblogic.xml:
IDLength

<param-name>/<param-value> element pair

weblogic.httpd.session.swapintervalSecs

weblogic.xml:
SwapIntervalSecs

<param-name>/<param-value> element pair

weblogic.httpd.session.timeoutSecs

weblogic.xml:
TimeoutSecs
<param-name>/<param-value> element pair

weblogic.httpd.session.URLRewriting.enable

weblogic.xml:
URLRewritingEnabled

<param-name>/<param-value> element pair

weblogic.httpd.tunneling.clientPingSecs

config.xml:
TunnelingClientPingSecs

(Server element)

Servers: Tuning: Tunneling Client Ping

weblogic.httpd.tunneling.clientTimeoutSecs

config.xml:
TunnelingClientTimeoutSecs

(Server element)

Servers: Tuning: Tunneling Client Timeout

weblogic.httpd.tunnelingenabled

config.xml
TunnelingEnabled

(Server element)

Servers: Tuning: Enable Tuneling

weblogic.httpd.URLResource

config.xml:
URLResource

(WebServer element)

weblogic.iiop.password

config.xml:
DefaultIIOPPassword

(Server element)

Servers: servername: Configuration: Protocols: Default IIOPPassword

weblogic.iiop.user

config.xml:
DefaultIIOPUser

(Server element)

Servers: servername: Configuration:Protocols: Default IIOPUser

weblogic.jdbc.connectionPool

  • url=URL for JDBC Driver

  • driver=full package name for JDBC driver

  • loginDelaySecs=seconds between connections

  • initialCapacity=initial number of JDBC connections

  • maxCapacity=maximum number of JDBC connections

  • capacityIncrement=increment interval

  • allowShrinking=true to allow shrinking

  • shrinkPeriodMins=interval before shrinking

  • testTable=name of table for autorefresh test

  • refreshTestMinutes=interval for autorefresh test

  • testConnsOnReserve=true to test connection at reserve

  • testConnsOnRelease=true to test connection at release

  • props=props for JDBC connection

config.xml
JDBCConnectionPool Element

  • ConnLeakProfilingEnabled

  • ACLName

  • URL

  • DriverName

  • Properties

  • LoginDelaySeconds

  • InitialCapacity

  • MaxCapacity

  • CapacityIncrement

  • CapacityEnabled

  • ShrinkPeriodMinutes

  • RefreshMinutes

  • TestTableName

  • TestConnectionsOnRelease

  • SupportsLocalTransaction

  • KeepLogicalConnOpenOnRelease

  • Password

weblogic.jdbc.enableLogFile

config.xml:
JDBCLoggingEnabled

(Server element)

weblogic.jdbc.logFileName

config.xml:
JDBCLogFileName

(Server element)

weblogic.jms.ConnectionConsumer

config.xml
JMSConnectionConsumer element

  • MessagesMaximum

  • Selector

  • Destination

Services: JMS

weblogic.jms.connectionFactoryArgs.<<factoryName>>

  • ClientID

  • DeliveryMode

  • TransactionTimeout

config.xml:
JMSConnectionFactory element

  • ClientID

  • DefaultDeliveryMode

  • TransactionTimeout

  • UserTransactionsEnabled

  • AllowCloseInOnMessage

Services: JMS: Connection Factories

weblogic.jms.connectionFactoryName

config.xml:
JMSConnectionFactory element

  • JNDIName

Services: JMS: Connection Factories

weblogic.jms.connectionPool

ConnectionPool

(JMSJDBCStore element)

Services: JMS: JMSJDBCStores

weblogic.jms.queue

config.xml:
JNDIName

StoreEnabled

(JMSDestination element)

Services: JMS:Connection Factories

weblogic.jms.queueSessionPool

config.xml:
ConnectionConsumer

ConnectionFactory

ListenerClass

AcknowledgeMode

SessionsMaximum

Transacted

(JMSSessionPool element)

Services: JMS: Servers: Session Pools

weblogic.jms.tableNamePrefix

config.xml:
PrefixName

weblogic.jms.topic

config.xml
JNDIName

StoreEnabled

(JMSDestination element)

Services: JMS: Servers: JMSServer-0: Destinations: JMS Queus, JMS Topics

weblogic.jms.topicSessionPool

config.xml:
ConnectionConsumer

ConnectionFactory

ListenerClass

AcknowledgeMode

SessionsMaximum

Transacted

(JMSSessionPool element)

Services: JMS: Servers: JMSServer-0: JMS Session Pools

weblogic.jndi.transportableObjectFactories

config.xml:
JNDITransportableObjectFactoryList

(Server element)

weblogic.login.readTimeoutMillisSSL

config.xml
LoginTimeoutMillis

(SSL element)

weblogic.security.audit.provider

config.xml
AuditProviderClassName

(Security element)

Security: Audit Provider Class

weblogic.security.certificate.authority

config.xml
ServerCertificateChainFileName

(SSL element)

weblogic.security.certificate.server

config.xml:
ServerCertificateFileName

(SSL element)

weblogic.security.certificateCacheSize

config.xml:
CertificateCacheSize

(SSL element)

weblogic.security.clientRootCA

config.xml:
TrustedCAFileName

(SSL element)

weblogic.security.disableGuest

config.xml:
GuestDisabled

(Security element)

Security: Guest Disabled

weblogic.security.enforceClientCert

config.xml:
ClientCertificateEnforced

(SSL element)

weblogic.security.key.export.lifespan

config.xml:
ExportKeyLifespan

(SSL element)

weblogic.security.key.server

config.xml:
ServerKeyFileName

(SSL element)

weblogic.security.ldaprealm.authentication

config.xml:
AuthProtocol

(LDAPRealm element)

weblogic.security.ldaprealm.credential

config.xml:
Credential

(LDAPRealm element)

weblogic.security.ldaprealm.factory

config.xml
LdapProvider

(LDAPRealm element)

weblogic.security.ldaprealm.groupDN

config.xml:
GroupDN

(LDAPRealm element)

weblogic.security.ldaprealm.groupIsContext

config.xml:
GroupIsContext

(LDAPRealm element)

weblogic.security.ldaprealm.groupNameAttribute

config.xml:
GroupNameAttribute

(LDAP Realm element)

weblogic.security.ldaprealm.groupUsernameAttribute

config.xml:
GroupUsernameAttribute

(LDAPRealm element)

weblogic.security.ldaprealm.principal

config.xml:
Principal

(LDAPRealm element)

weblogic.security.ldaprealm.ssl

config.xml:
SSLEnable

(LDAPRealm element)

weblogic.security.ldaprealm.url

config.xml:
LDAPURL

(LDAPRealm element)

weblogic.security.ldaprealm.userAuthentication

config.xml:
UserAuthentication

(LDAPRealm element)

weblogic.security.ldaprealm.userDN

config.xml:
UserDN

(LDAPRealm element)

weblogic.security.ldaprealm.userNameAttribute

config.xml:
UserNameAttribute

(LDAPRealm element)

weblogic.security.ldaprealm.userPasswordAttribute

config.xml:
UserPasswordAttribute

(LDAPRealm element)

weblogic.security.net.connectionFilter

config.xml:
ConnectionFilter

(Security element)

weblogic.security.ntrealm.domain

config.xml:
PrimaryDomain

(NTRealm element)

weblogic.security.realm.cache.acl.enable

config.xml:
ACLCacheEnable

(CachingRealm element)

weblogic.security.realm.cache.acl.size

config.xml:
ACLCacheSize

(CachingRealm element)

weblogic.security.realm.cache.acl.ttl.negative

config.xml:
ACLCacheTTLNegative

(CachingRealm element)

weblogic.security.realm.cache.acl.ttl.positive

config.xml:
ACLCacheTTLPositive

(CachingRealm element)

weblogic.security.realm.cache.auth.enable

config.xml:
AuthenticationCacheEnable

(CachingRealm element)

weblogic.security.realm.cache.auth.size

config.xml:
AuthenticationCacheSize

(CachingRealm element)

weblogic.security.realm.cache.auth.ttl.negative

config.xml:
AuthenticationCacheTTLNegative

(CachingRealm element)

weblogic.security.realm.cache.auth.ttl.positive

config.xml:
AuthenticationCacheTTLPositive

(CachingRealm element)

weblogic.security.realm.cache.caseSensitive

config.xml:
CacheCaseSensitive
(CachingRealm element)

weblogic.security.realm.cache.group.enable

config.xml:
GroupCacheEnable

(CachingRealm element)

weblogic.security.realm.cache.group.size

config.xml:
GroupCacheSize

(CachingRealm element)

weblogic.security.realm.cache.group.ttl.negative

config.xml:
GroupCacheTTLNegative

(CachingRealm element)

weblogic.security.realm.cache.group.ttl.positive

config.xml:
GroupCacheTTLPositive

(CachingRealm element)

weblogic.security.realm.cache.perm.enable

config.xml:
PermissionCacheEnable

(CachingRealm element)

weblogic.security.realm.cache.perm.size

config.xml:
PermissionCacheSize

(CachingRealm element)

weblogic.security.realm.cache.perm.ttl.negative

config.xml:
PermissionCacheTTLNegative

(CachingRealm element)

weblogic.security.realm.cache.perm.ttl.positive

config.xml:
PermissionCacheTTLPositive

(CachingRealm element)

weblogic.security.realm.cache.user.enable

config.xml:
UserCacheEnable

(CachingRealm element)

weblogic.security.realm.cache.user.size

config.xml:
UserCacheSize

(CachingRealm element)

weblogic.security.realm.cache.user.ttl.negative

config.xml:
UserCacheTTLNegative

(CachingRealm element)

weblogic.security.realm.cache.user.ttl.positive

config.xml:
UserCacheTTLPositive

(CachingRealm element)

weblogic.security.realm.certAuthenticator

config.xml:
CertAuthenticator

(SSL element)

weblogic.security.SSL.ciphersuite

config.xml
Ciphersuites

(SSL element)

weblogic.security.ssl.enable

config.xml:
Enabled

(SSL element)

weblogic.security.SSL.hostnameVerifier

config.xml
HostnameVerifier

(SSL element)

weblogic.security.SSLHandler.enable

config.xml:
HandlerEnabled

(SSL element)

weblogic.security.unixrealm.authProgram

config.xml:
AuthProgram

(UnixRealm element)

weblogic.system.AdministrationPort

config.xml
AdministrationPort

(Server element)

weblogic.system.AdministrationPort

config.xml:
AdministrationPort

(Server element)

weblogic.system.bindAddr

config.xml:
ListenAddress

(Server element)

weblogic.system.defaultProtocol

config.xml:
DefaultProtocol

(Server element)

weblogic.system.defaultSecureProtocol

config.xml:
DefaultSecureProtocol

(Server element)

weblogic.system.enableConsole

config.xml:
StdoutEnabled

(Kernel element)

weblogic.system.enableIIOP

config.xml:
IIOPEnabled

(Server element)

weblogic.system.enableReverseDNSLookups

config.xml:
ReverseDNSAllowed

(Server element)

weblogic.system.enableSetGID

config.xml:
PostBindGIDEnabled

(UnixMachine element)

weblogic.system.enableSetUID

config.xml:
PostBindUIDEnabled

(UnixMachine element)

weblogic.system.enableTGIOP

config.xml
TGIOPEnabled

(Server element)

weblogic.system.helpPageURL

config.xml
HelpPageURL

(Server element)

weblogic.system.home

config.xml:
RootDirectory

(Server element)

weblogic.system.ListenPort

config.xml
ListenPort

(Server element)

weblogic.system.logFile

config.xml:
FileName

(Log element)

weblogic.system.MagicThreadBackToSocket

config.xml:
MagicThreadDumpBackToSocket

(ServerDebug element)

weblogic.system.MagicThreadDumpFile

config.xml:
MagicThreadDumpFile

(ServerDebug element)

weblogic.system.MagicThreadDumpHost

config.xml:
MagicThreadDumpHost

(ServerDebug element)

weblogic.system.magicThreadDumps

config.xml:
MagicThreadDumpEnabled

(ServerDebug element)

weblogic.system.maxLogFileSize

config.xml:
FileMinxSize

(Log element)

weblogic.system.nativeIO.enable

config.xml:
NativeIOEnabled

(Server element)

weblogic.system.nonPrivGroup

config.xml
PostBindGID

(UnixMachine element)

weblogic.system.nonPrivUser

config.xml
PostBindUID

(UnixMachine element)

weblogic.system.percentSocketReaders

config.xml:
ThreadPoolPercentSocketReaders

(Kernel element)

weblogic.system.readTimeoutMillis

config.xml
LoginTimeoutMillis

(Server element)

weblogic.system.readTimeoutMillis

config.xml:
LoginTimeoutMillis

(Server element)

weblogic.system.SSL.useJava

config.xml:
UseJava

(SSL element)

weblogic.system.SSLListenPort

config.xml:
ListenPort

(SSL element)

weblogic.system.startupFailureIsFatal

config.xml
FailureIsFatal

(StartupClass element)

weblogic.system.user

config.xml:
SystemUser

(Security element)

Security: Users

weblogic.system.weight

config.xml
ClusterWeight

(Server element)

Server: servername: Cluster: Cluster Weight

weblogic.workspace.showUserKeysOnly

config.xml:
WorkspaceShowUserKeysOnly

(Server element)

weblogic.zac.enable

config.xml:
ZACEnabled

(Server element)

weblogic.zac.publishRootProp

config.xml:
ZACPublishRoot

(Server element)

Setting Up Your New Domain

A domain is an interrelated collection of WebLogic Server resources and configuration files that occupy a single specific namespace. Only one domain can be active at a time. For more information on domains, see Domains, the Administration Server and Managed Servers. To use your new domain you must start your server with the correct domain and copy the WebLogic Server Administration Console into the appropriate location. The WebLogic Server Administration Console is a sophisticated Web Application and an essential tool in managing your server.

Restarting the Server

In order to use your new domain you must restart the server, specifying before startup your new domain name. To do so, startup scripts have been provided. These scripts, which are generated when a weblogic.property file is converted, are named startdomainName.cmd (for Windows users) and startdomainName.sh (for UNIX users) and exist under the wlserver6.0/config/domainName directory. These scripts will start the server in the new domain.

These startup scripts make it easier to start instances of WebLogic Server. You may need to modify them to fit your environment and applications. See Starting and Stopping the WebLogic Server for more information on scripts and starting servers. More information is also available in the Administrator's Guide, under Migrating from Earlier Versions of WebLogic Server.

Copying the Administration Console to Your New Domain

Before restarting your server, it is also necessary to copy the Adminstration Console Web Application into the newly created domain. The Administration Console is a Web Application with its own .war file and can be treated as any other Web Application.

To copy it into your new domain, follow these steps:

  1. After converting your properties file, shut down the server by closing the window where the server is running.

  2. Navigate to wlserver6.0/config/mydomain/applications.

  3. Copy the console.war file.

  4. Proceed to wlserver6.0/config/domainName/applications

  5. Place the copy of console.war inside the new wlserver6.0/config/domainName/applications directory.

  6. Restart your server and refresh the browser window that contains your console.

At the top middle of the main console window as well as the top of the left hand pane, you should see your new domain displayed as the active domain. Now you can begin to migrate your applications.

Migrating Applications

Applications on a J2EE-compliant server such as WebLogic Server 6.0 are created and deployed as one of the following four types: Web Applications, Enterprise JavaBeans, Enterprise Archives, and Client Applications. To migrate your existing components to WebLogic Server 6.0, create the appropriate J2EE deployment units. Web Applications are usually a collection of servlets, JSPs, and HTML files. Enterprise JavaBeans are server-side Java components written according to the EJB specification. Enterprise Archives may contain a combination of EJB components and Web Application components. Client Applications are Java classes that connect to WebLogic Server using Remote Method Invocation (RMI). Each of the aforementioned J2EE deployment units are discussed in greater detail within the following sections.

Web Applications

A Web Application is created by correctly packaging into a single unit the servlets, JSPs and HTML pages that make up an application.

In order to deploy an application as a Web Application it is necessary to create certain .xml files that contain configuration information on that application. If you have converted your properties file, these .xml files (web.xml and weblogic.xml) have been created for you and placed inside a wlserver6.0/config/domainName/applications/DefaultWebApp_myserver/WEB-INF directory. The process of converting your weblogic.properties file also creates the config.xml file located in wlserver6.0/config/domainName/. This file contains configuration information specific to your server.

In order to migrate applications into a Web Application deployed on WebLogic Server 6.0, the files of your application must be placed within a directory structure that follows a specific pattern. For development, these files can be left in an exploded directory format. However, for production situations, it is highly recommended that you bundle your applications into the appropriate .war file as a singular Web Application. For more information on Web Applications see Understanding WebLogic Server Applications and Deploying and Configuring Web Applications.

Directory Structure

Web Applications are organized within a specified directory structure so that they can be archived and deployed on WebLogic Server. All servlets, classes, static files, and other resources belonging to a Web Application are organized under a directory hierarchy. The root of this hierarchy defines the document root of your Web Application. All files under this root directory can be served to the client, except for files under the special directories WEB-INF and META-INF located in the root directory. The root directory should be named with the name of your Web Application and placed inside the wlserver6.0/config/domainName/applications directory.

The following diagram illustrates the directory structure of any Web Application.

WebApplicationRoot/(Publically available files such as
| .jsp, .html, .jpg, .gif)
|
+WEB-INF/-+
|
+ classes/(directory containing
| Java classes including
| servlets used by the
| Web Application)
|
+ lib/(directory containing
| jar files used by the
| Web Application)
|
+ web.xml
|
+ weblogic.xml

If you have already converted your properties file, the appropriate web.xml and weblogic.xml files have already been created for you under the directory wlserver6.0/config/domainName/applications/DefaultWebApp_myserver/WEB-INF. Follow the above directory structure and place the .xml files in the wlserver6.0/config/domainName/applications/webAppName/WEB-INF directory that you create. All applications must be placed inside a wlserver6.0/config/domainName/applications directory in order to be deployed. For more information see Developing WebLogic Server Applications.

XML Deployment Descriptors

The Web Application Deployment Descriptor (web.xml) is a standard J2EE descriptor used to register your servlets, define servlet initialization parameters, register JSP tag libraries, define security constraints, and other Web Application parameters. For detailed instructions on creating the deployment descriptor, see Writing the Web Application Deployment Descriptor.

There is also a WebLogic-specific Deployment Descriptor (weblogic.xml). In this file you define JSP properties, JNDI mappings, security role mappings, and HTTP session parameters. The WebLogic-specific deployment descriptor also defines how named resources in the web.xml file are mapped to resources residing elsewhere in WebLogic Server. For detailed instructions on creating the WebLogic-specific deployment descriptor, see Writing the WebLogic-specific Deployment Descriptor. This file may not be required if you have no need for any of the above mentioned properties, mappings, or parameters.

If you have converted your weblogic.properties file, a web.xml and weblogic.xml file have already been created for you. Use the web.xml and weblogic.xml files, in conjunction with the console, to configure your applications. The .xml files can be viewed through any text editor. To edit them, simply make your changes and save the file as web.xml or weblogic.xml with the appropriate path as specified by the prescribed directory structure. See Configuring your Web Applications for more information. If you do not want to deploy your applications together as a single Web Application, you need to split up the .xml files that have been created for you, creating the appropriate .xml files specific to each Web Application.

WAR Files

A .war file is a Web Application archive. If you have correctly followed the prescribed directory structure of a Web Application and created the appropriate web.xml and weblogic.xml files, it is strongly recommended that in production environments your applications are bundled together in a Web Application deployed as a .war file. Once you have done so, it is important to remove the previously existing directory structure so that WebLogic Server only has one instance of each application.

Use the following command line from the root directory containing your Web Application to create a .war file, replacing `webAppName' with the specific name you have chosen for your Web Application:

jar cvf webAppName.war *

You now have created a .war file that contains all the files and configuration information for your Web Application.

Deploying Web Applications

To deploy your bundled Web Applications properly, place the appropriate .war file in the c:/wlserver6.0/config/domainName/applications directory. You can also install the application through the Administration Console. To do so, go to the console home and choose Install Applications under the Getting Started menu. Select the correct .war file and it will be installed automatically. Note that it is necessary to have your applications reside in a c:/wlserver6.0/config/domainName/applications directory in order for them to work.

Web Applications should be deployed automatically after they have been installed. Check to see that they are deployed under the Deployments node in the left hand pane of the Administration Console.

You can configure certain deployment attributes for your Web Application using the Administration Console. Select the Web Applications node under the Deployments heading. Select your Web Application. Click on the appropriate tab to configure. For more information on setting attributes in the console, see the Web Application section of the Console Help.

JavaServer Pages (JSP) and Servlets

This section contains information specific to JSPs and servlets that may be pertinent to your applications.