BEA Logo BEA WLCS Release 3.5

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WLCS Documentation   |   Deployment Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

The Reference Domain

 

A WebLogic Server domain is the administrative unit that you use to manage one or more web applications and/or enterprise applications. Campaign Manager for WebLogic, WebLogic Commerce Server, and WebLogic Personalization Server includes a sample (reference) domain, which includes an enterprise application that your developers can use as a starting point for developing your own enterprise application. The following sections in this topic describe the reference domain and its contents:

Before you continue, we recommend that you read the following:

 


About the Reference Domain

Because WebLogic Server specifies that all domains must reside in a directory named config, Campaign Manager for WebLogic, WebLogic Commerce Server, and WebLogic Personalization Server installs its reference domain in WL_COMMERCE_HOME/config/wlcsDomain.

A config directory can contain any number of domains. You can place a config directory in any location that can access (and is accessible to) WebLogic Server and Campaign Manager for WebLogic, WebLogic Commerce Server, and WebLogic Personalization Server services.

The domain that Campaign Manager for WebLogic, WebLogic Commerce Server, and WebLogic Personalization Server installs, wlcsDomain, contains the following (see Figure 1-1):

 


About the Reference Enterprise Application

Campaign Manager for WebLogic, WebLogic Commerce Server, and WebLogic Personalization Server provides a reference enterprise application, wlcsApp, as a starting point from which you develop your own enterprise application. The wlcsApp directory tree contains the following (see Figure 1-2):

Note: The Admin Tool web application and the WebLogic Server Administration Console are two separate web applications with separate functions. In addition, Admin Tool must be deployed inside an enterprise application with your exampleportal and wlcs web applications.

The wlcsApp Deployment Descriptor

The wlcsApp deployment descriptor conforms to the J2EE specification, naming components and declaring the global security roles that apply to all components in the enterprise application.

To conform to J2EE specifications, the deployment descriptor is named application.xml and is located in
WL_COMMERCE_HOME/config/wlcsDomain/applications/wlcsApp/META-INF
where wlcsApp is the root of the enterprise application.

This section describes the following elements in the deployment descriptor:

For information about other elements in the deployment descriptors, refer to the Performance Tuning Guide.

For more information about enterprise application deployment descriptors, refer to the "Application Assembly and Deployment" chapter of the JavaTM 2 Platform Enterprise Edition Specification, v1.3.

Opening Commands and Declarations

The deployment descriptor starts with an optional processing command:

<?xml version="1.0" encoding="UTF-8"?>

Then it declares its DTD:

<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>

The Root and Application Name Elements

The root element is named <application>, and an </application> tag closes it.

WebLogic Server uses the following element to identify the enterprise application:

<display-name>name</display-name>

You can also use the following element to document the purpose and scope of the enterprise application:

<description>text description</description>

Module Elements

Each component in an enterprise application must be declared within a module element.

The deployment descriptor uses following element syntax to name each web application:

<module>

<web>

<web-uri>URI of a web application file,
relative to the top level of the enterprise application
</web-uri>

<context-root>Root directory of the web application
</context-root>

</web>

</module>

It uses the following element syntax to name each shared EJB JAR:

<module>

<ejb>pathname of the JAR file that contains the EJB</ejb>

</module>

Global Security Role Elements

The deployment descriptor uses the following element syntax to declare security roles that are valid for all components in the enterprise application:

<security-role>

<description>text displayed in the Administration Console
</description>

<role-name>name of role</role-name>

</security-role>

 


About the Example Portal Deployment Descriptor

The portal (exampleportal) web application uses a deployment descriptor, formatted in XML, to specify the following information:

For more information about the XML elements that this section describes, refer to "web.xml Deployment Descriptor Elements in Developing WebLogic Server Applications.

Opening Commands and Declarations

The deployment descriptor starts with an optional processing command:

<?xml version="1.0" encoding="ISO-8859-1"?>

Then it declares its DTD:

<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

The Root Element and Application Description

The root element of the deployment descriptor is named <web-app>, and a </web-app> tag closes it.

The following element documents the name of the web application, as specified in JavaTM 2 Platform Enterprise Edition Specification, v1.3:

<display-name>name of web application</display-name>

WebLogic Server does not use this element to identify the web application. Instead, it uses the module name that you specify in the enterprise application's application.xml file. For more information, refer to Module Elements.

Precompiling JSPs

The following element determines whether WebLogic Personalization Server compiles all JSPs in the web application when you start the server:

<context-param>

<param-name>weblogic.jsp.precompile</param-name>

<param-value>false</param-value>

</context-param>

By default, the element sets the value to false, which deactivates the JSP precompile option. With this option deactivated, the server starts quickly but must compile each new or modified JSP when you access it, causing a significant delay the first time you request a new or modified JSP.

When you activate the precompile option, the server startup process checks for new or modified JSPs in the web application and compiles them. Activating the precompile option can cause a significant delay in server startup if you have modified or added JSPs but avoids delays when you access a new or modified JSP for the first time.

Servlet Registration and Mapping

The following element syntax registers a servlet that the web application uses:

<servlet>

<servlet-name>name that WebLogic Server uses when managing
the servlet
</servlet-name>

<servlet-class>name of the class file that implements
the servlet
</servlet-class>

</servlet>

The example portal web application includes several <servlet> elements to register several servlets.

The following element syntax defines a mapping between a servlet and a URL pattern:

<servlet-mapping>

<servlet-name>name that WebLogic Server uses when managing
the servlet
</servlet-name>

<url-pattern>pattern used to resolve URLs</url-pattern>

</servlet-mapping>

MIME-Type Mapping

The following <mime-mapping> element defines a mapping between an extension and a MIME type:

<mime-mapping>

<extension>
name of extension
</extension>

<mime-type>
A string describing the defined mime type
</mime-type>

</mime-mapping>

 


About the e-Commerce Deployment Descriptor

The e-commerce (wlcs) web application uses a deployment descriptor, formatted in XML, to specify the following information:

For information on modifying parameters to enhance performance in the production environment, refer to the Performance Tuning Guide.

For more information about the XML elements that this section describes, refer to "web.xml Deployment Descriptor Elements in Developing WebLogic Server Applications.

Opening Commands and Declarations

The deployment descriptor starts with an optional processing command:

<?xml version="1.0" encoding="ISO-8859-1"?>

Then it declares its DTD:

<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

The Root Element and Application Description

The root element of the deployment descriptor is named <web-app>, and a </web-app> tag closes it.

The following element syntax documents the purpose and scope of the web application, as specified in the JavaTM 2 Platform Enterprise Edition Specification, v1.3:

<description>text description</description>

WebLogic Server does not use this element to identify the web application. Instead, it uses the module name that you specify in the enterprise application's application.xml file. For more information, refer to Module Elements.

Precompiling JSPs

The following element determines whether WebLogic Commerce Server compiles all JSPs in the web application when you start the server:

<context-param>

<param-name>weblogic.jsp.precompile</param-name>

<param-value>false</param-value>

</context-param>

By default, the element sets the value to false, which deactivates the JSP precompile option. With this option deactivated, the server starts quickly but must compile each new or modified JSP when you access it, causing a significant delay the first time you request a new or modified JSP.

When you activate the precompile option, the server startup process checks for new or modified JSPs in the web application and compiles them. Activating the precompile option can cause a significant delay in server startup if you have modified or added JSPs but avoids delays when you access a new or modified JSP for the first time.

Application URLs

The following element determines the URL that you use to request the WebLogic Commerce Server admin tools:

<context-param>

<param-name>WLCS_ADMIN_URL</param-name>

<param-value>/tools/application/admin</param-value>

</context-param>

The following element determines the context for URLs that the Webflow mechanism generates:

<context-param>

<param-name>WLCS_APPLICATION_URL</param-name>

<param-value>/application/commercewf</param-value>

</context-param>

Port Numbers and Security Constraints for Generated URLs

The wlcs deployment descriptor contains several sets of elements to implement the J2EE declarative security model. This section describes the elements that configure the createWebflowURL() method to do the following:

Other elements, described later in this document, are responsible for the following:

Generate Port Numbers for HTTP and HTTPS

The following elements determine which port numbers the createWebflowURL() method encodes in the URLs that it generates:

<context-param>
<param-name>HTTP_PORT</param-name>
<param-value>port-number</param-value>
</context-param>
<context-param>
<param-name>HTTPS_PORT</param-name>
<param-value>port-number</param-value>
</context-param>

If you want the wlcs web application to use the same port numbers as the WebLogic Server instance (for example, if you are using WebLogic Server as your HTTP server), either deactivate these elements by surrounding them in comment tags,
<!-- -->, or change the values to match the listen port properties for the server. For more information, refer to
Changing the Listen Ports.

If you want the wlcs web application to use different port numbers (for example, if you want to use the port numbers of a proxy server), change the values.

Determine Which Links Use HTTPS

The following element syntax declares a set of files, pipelines, and input processors that need to be accessed via HTTPS. When the createWebflowURL() method encounters one of the resources you declare in the <param-value> subelement, it generates a URL that uses the HTTPS protocol.

<context-param>
   <param-name>HTTPS_URL_PATTERNS</param-name>
   <param-value>
      URLs-and-URL patterns
   </param-value>
</context-param>

You can add specific resource names or name patterns to the <param-value> element. Name specific resources by adding their name to the list. When naming specific pipelines and input processors, do not use the .inputprocessor or .pipeline extension.

Specify patterns for pipelines and input processors in the form of pattern_*. For example, to enable SSL for all requests to input processors whose names start with profileeditcc_, use the pattern profileeditcc_*.

If you add any target names or patterns to the <param-value> element, you must also add them to the <security-constraint> element, which is described in Declarations of Secure JSPs.

Servlet Registration and Mapping

The following element syntax registers a single servlet that the web application uses:

<servlet>

<servlet-name>name that WebLogic Server uses when managing
the servlet
</servlet-name>

<servlet-class>name of the class file that implements
the servlet
</servlet-class>

</servlet>

The e-Commerce sample web application includes several <servlet> elements to register several servlets.

The following element syntax defines a mapping between a servlet and a URL pattern:

<servlet-mapping>

<servlet-name>name that WebLogic Server uses when managing
the servlet
</servlet-name>

<url-pattern>pattern used to resolve URLs</url-pattern>

</servlet-mapping>

URL Root for the AdClickThru Servlet

The following element specifies the root for URLs that the AdClickThru servlet uses. Do not modify this element.

<context-param>
<param-name>AD_CONTENT_BASE</param-name>
<param-value>/wlcs</param-value>
</context-param>

Session Timeout

The <session-timeout> parameter determines how many minutes of inactivity the server will tolerate before ending the session. The WL_COMMERCE_HOME/server/webapps/wlcs/web.xml file sets the parameter to 15 minutes. You can modify this setting depending on your security needs.

<session-config>
   <session-timeout>15</session-timeout>
</session-config>

Main Page and Error Page Mappings

The following <welcome-file-list> element specifies a main page for your web application:

<welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
</welcome-file-list>

If you have named your main page something other than index.jsp, modify the value in your web application's deployment descriptor.

If a web application declares a main page, you can access the page by specifying the context root in the URL: http://host:port/context-name. You declare a web application's context root in the deployment descriptor for the enterprise application. For more information, refer to Module Elements.

The <error-page> elements use the following syntax to map error codes that the HTTP server returns to HTML files or JSPs:

<error-page>
   <error-code>number that the server returns</error-code>
   <location>pathname to page that displays an 
error message
</location>
</error-page>

Declarations of Secure JSPs

The following <security-constraint> element syntax declares a collection of resources (JSPs) that only specific roles can access:

<security-constraint>
 <web-resource-collection>
    <web-resource-name>name of the resource collection</web-resource-name>
     <description>documentation of the collection's scope and purpose
</description>
     <url-pattern>single URL pattern: use as many url-pattern elements as 
you need. One pattern/filename per element.
</url-pattern>
     <http-method>GET</http-method>
     <http-method>POST</http-method>
    </web-resource-collection>
     <auth-constraint>
       <description>documentation of the authorization constraint</description>
       <role-name>name of declared security role: use as many role-name elements
as you need. One role per element.
</role-name>
    </auth-constraint>
     <user-data-constraint>
       <transport-guarantee>INTEGRAL or CONFIDENTIAL; see below for details
</transport-guarantee>
    </user-data-constraint>
</security-constraint>

Use one of the following values in the <transport-guarantee> element:

Note: Two files establish security roles for wlcs:

The wlcs deployment descriptor declares a single role, CustomerRole, in the <role-name> element and several <url-pattern> elements. To give another role access to the resource collection, add <role-name> elements to the <auth-constraint> element.

You can add <url-pattern> elements to specify new directories or to specify specific files. Note that a pattern or filename must start with a / character (forward slash). For more information on specifying URL patterns, refer to the Java Servlet Specification v2.2.

If you add any <url-pattern> elements, you must also add those patterns to the patterns defined for <param-name>HTTPS_URL_PATTERNS</param-name>. For more information, see Determine Which Links Use HTTPS.

 


The weblogic.xml File

In addition to the web.xml deployment descriptor, each web application in the wlcsApp enterprise application uses weblogic.xml to declare deployment properties that are specific to WebLogic Server.

For more information, refer to "weblogic.xml Deployment Descriptor Elements" in Deploying WebLogic Server Applications.

The weblogic.xml file contains sections to set the following properties:

Opening Declaration

weblogic.xml starts by declaring its DTD:

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 6.0//EN" "http://www.bea.com/servers/wls600/dtd/ weblogic-web-jar.dtd">

The Root Element

The root element of weblogic.xml is named <weblogic-web-app>, and a </weblogic-web-app> tag closes it.

Security-Role Mappings

Each web application uses the following element syntax to map a J2EE security role to a user or group that a security realm uses to define ACLs:

<security-role-assignment>

<role-name>J2EE-role</role-name>

<principal-name>security-realm user or group</principal-name>

</security-role-assignment>

For example, WebLogic Commerce Server uses the following element to map settings that its security realm defines for wlcs_customer to settings that application.xml defines for the CustomerRole J2EE security role:

<security-role-assignment>

<role-name>CustomerRole</role-name>

<principal-name>wlcs_customer</principal-name>

</security-role-assignment>

For more information on setting properties for J2EE security roles, refer to Global Security Role Elements.

JSP Deployment Options

Each web application includes a <jsp-descriptor> element to specify options for deploying JSPs. The <jsp-descriptor> element includes subelements to specify the following options:

For more information, refer to "weblogic.xml Deployment Descriptor Elements" in Deploying WebLogic Server Applications.

Naming Cookies

Each web application uses the following element to provide a unique name for the cookies that they set:

<session-descriptor>
<session-param>
<param-name>CookieName</param-name>
<param-value>
cookie-name
</param-value>
</session-param>
</session-descriptor>

For more information, refer to "weblogic.xml Deployment Descriptor Elements" in Deploying WebLogic Server Applications.

 

back to top previous page next page